From 9b7c355c573c00a9e0e9f64345bed32a6d78c861 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 b08ee3467..69116a8c8 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