summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgengchc2 <geng.changcai2@zte.com.cn>2016-12-02 09:56:27 +0800
committergengchc2 <geng.changcai2@zte.com.cn>2016-12-02 09:56:27 +0800
commit40d73a0b585fde9c065fb069d7a31c4717c8887d (patch)
treebb9cb8b6cdb85c8387fe538f7e3f80b920304123
parent3a509be871ec104e46f4a2c11503bdfee0e863b4 (diff)
downloadpython-openstackclient-40d73a0b585fde9c065fb069d7a31c4717c8887d.tar.gz
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: I3ec3680debbfad7c06f2251396e0e8e4e3df6c50
-rw-r--r--openstackclient/shell.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/openstackclient/shell.py b/openstackclient/shell.py
index be4b5283..e08eee61 100644
--- a/openstackclient/shell.py
+++ b/openstackclient/shell.py
@@ -148,10 +148,10 @@ class OpenStackShell(shell.OpenStackShell):
'auth_type': self._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
if not self.options.debug:
self.options.debug = None