> > + try:
> > + self()
> > + except TokenAuthorizationException, e:
> > + print str(e)
> > + self.error_code = -1
> > + return self.pressEnterToExit()
>
> The above call is redundant because of the one below, no?
>
> > + return self.pressEnterToExit()
Yes, I've removed the redundant call.
> > + def pressEnterToExit(self):
> > + """Make the user hit enter, and then exit with an error code."""
> > + prompt = '\nPress enter to go back to "%s". ' % self.consumer_name
> > + self.input_method(prompt)
> > + self.exit_with(self.error_code)
> > + return self.error_code
>
> Since exit_with() will call sys.exit(), there's no reason to return
> anything here, is there?
The default implementation of exit_with() calls sys.exit(), but my testing version returned the error code. However I was just ignoring the error code in my tests, so it's not necessary.
> > + try: ionException, e: ToExit( ) ToExit( )
> > + self()
> > + except TokenAuthorizat
> > + print str(e)
> > + self.error_code = -1
> > + return self.pressEnter
>
> The above call is redundant because of the one below, no?
>
> > + return self.pressEnter
Yes, I've removed the redundant call.
> > + def pressEnterToExi t(self) : method( prompt) with(self. error_code)
> > + """Make the user hit enter, and then exit with an error code."""
> > + prompt = '\nPress enter to go back to "%s". ' % self.consumer_name
> > + self.input_
> > + self.exit_
> > + return self.error_code
>
> Since exit_with() will call sys.exit(), there's no reason to return
> anything here, is there?
The default implementation of exit_with() calls sys.exit(), but my testing version returned the error code. However I was just ignoring the error code in my tests, so it's not necessary.