mirror of
https://opendev.org/openstack/python-openstackclient.git
synced 2026-01-17 07:20:45 +00:00
Merge "fix authentication setup in interactive mode and improve error handling so tracebacks are not printed twice"
This commit is contained in:
commit
fd8197de6d
1 changed files with 9 additions and 4 deletions
|
|
@ -196,9 +196,11 @@ class OpenStackShell(App):
|
|||
|
||||
# If the user is not asking for help, make sure they
|
||||
# have given us auth.
|
||||
cmd_info = self.command_manager.find_command(argv)
|
||||
cmd_factory, cmd_name, sub_argv = cmd_info
|
||||
if cmd_name != 'help':
|
||||
cmd_name = None
|
||||
if argv:
|
||||
cmd_info = self.command_manager.find_command(argv)
|
||||
cmd_factory, cmd_name, sub_argv = cmd_info
|
||||
if self.interactive_mode or cmd_name != 'help':
|
||||
self.authenticate_user()
|
||||
|
||||
def prepare_to_run_command(self, cmd):
|
||||
|
|
@ -215,7 +217,10 @@ class OpenStackShell(App):
|
|||
|
||||
|
||||
def main(argv=sys.argv[1:]):
|
||||
return OpenStackShell().run(argv)
|
||||
try:
|
||||
return OpenStackShell().run(argv)
|
||||
except:
|
||||
return 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue