From 8e7b3092182cd6fa4e14785416ed199b1ea8623b Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Thu, 1 Jun 2017 15:36:52 +0200 Subject: [PATCH] Exit with appropriate error code --- bin/salomeContext.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/salomeContext.py b/bin/salomeContext.py index 2e63384f2..bff6c5ba2 100644 --- a/bin/salomeContext.py +++ b/bin/salomeContext.py @@ -260,7 +260,7 @@ class SalomeContext: try: res = getattr(self, command)(options) # run appropriate method - return res or (None, None) + return res or 0 except SystemExit, returncode: if returncode != 0: self.getLogger().error("SystemExit %s in method %s.", returncode, command) @@ -616,7 +616,8 @@ if __name__ == "__main__": context = pickle.loads(sys.argv[1]) args = pickle.loads(sys.argv[2]) - context._startSalome(args) + status = context._startSalome(args) + sys.exit(status) else: usage() # -- 2.39.2