From 2bd3ec0d4c2a5cec3e7d49433fab2df7daee6dba Mon Sep 17 00:00:00 2001 From: Gilles DAVID Date: Thu, 14 Sep 2017 15:04:40 +0200 Subject: [PATCH] [PATCH] Fix test on return code Conflicts: bin/salomeContext.py --- bin/salomeContext.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/salomeContext.py b/bin/salomeContext.py index 2e63384f2..1e72edc65 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 -- 2.39.2