From: Gilles DAVID Date: Thu, 14 Sep 2017 13:04:40 +0000 (+0200) Subject: [PATCH] Fix test on return code X-Git-Tag: V8_4_0b1~2^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=be594b7e12a28f798c769967b1547a8217dac21d;p=modules%2Fkernel.git [PATCH] Fix test on return code Conflicts: bin/salomeContext.py --- diff --git a/bin/salomeContext.py b/bin/salomeContext.py index 91fe2a846..f4bbf8861 100644 --- a/bin/salomeContext.py +++ b/bin/salomeContext.py @@ -261,10 +261,10 @@ class SalomeContext: try: res = getattr(self, command)(options) # run appropriate method return res or (None, None) - except SystemExit, returncode: - if returncode != 0: - self.getLogger().error("SystemExit %s in method %s.", returncode, command) - return returncode + except SystemExit as ex: + if ex.code != 0: + self.getLogger().error("SystemExit %s in method %s.", ex.code, command) + return ex.code except StandardError: self.getLogger().error("Unexpected error:") import traceback