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