Correct reraising of exception
When an exception was caught and rethrown, it should call 'raise' without any arguments because it shows the place where an exception occured initially instead of place where the exception re-raised. Change-Id: I5fb6dea5da7fb6e1e2b339a713c7d37f8c99e407
This commit is contained in:

committed by
Steve Martinelli

parent
272d193401
commit
6f36385cb8
openstackclient
4
openstackclient/shell.py
Normal file → Executable file
4
openstackclient/shell.py
Normal file → Executable file
@ -331,10 +331,10 @@ class OpenStackShell(app.App):
|
||||
'auth_type': auth_type,
|
||||
},
|
||||
)
|
||||
except (IOError, OSError) as e:
|
||||
except (IOError, OSError):
|
||||
self.log.critical("Could not read clouds.yaml configuration file")
|
||||
self.print_help_if_requested()
|
||||
raise e
|
||||
raise
|
||||
|
||||
# TODO(thowe): Change cliff so the default value for debug
|
||||
# can be set to None.
|
||||
|
Reference in New Issue
Block a user