From: Cédric Aguerre Date: Thu, 1 Jun 2017 13:36:52 +0000 (+0200) Subject: Exit with appropriate error code X-Git-Tag: Before_multi_study_removal_06072017~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9b7c355c573c00a9e0e9f64345bed32a6d78c861;p=modules%2Fkernel.git Exit with appropriate error code --- 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() #