From 40d73a0b585fde9c065fb069d7a31c4717c8887d Mon Sep 17 00:00:00 2001 From: gengchc2 Date: Fri, 2 Dec 2016 09:56:27 +0800 Subject: [PATCH] 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 --- openstackclient/shell.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openstackclient/shell.py b/openstackclient/shell.py index be4b52834a..e08eee61df 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