From: Gilles DAVID Date: Wed, 4 Oct 2017 07:32:18 +0000 (+0200) Subject: Merge remote-tracking branch 'origin/master' into V9_dev X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d9ed049b89cfff4d8d96f0247ac5f2ec0200e3d0;p=modules%2Fyacs.git Merge remote-tracking branch 'origin/master' into V9_dev Conflicts: bin/appli_gen.py bin/appliskel/salome bin/salomeContext.py --- d9ed049b89cfff4d8d96f0247ac5f2ec0200e3d0 diff --cc bin/appli_gen.py index e8b9f9fc2,0dbab540b..f63b63142 mode 100644,100755..100755 --- a/bin/appli_gen.py +++ b/bin/appli_gen.py @@@ -194,8 -205,8 +203,8 @@@ def install(prefix, config_file, verbos pass if verbose: - for cle,val in list(_config.items()): + for cle,val in _config.items(): - print cle, val + print(cle, val) pass # Remove CTestTestfile.cmake; this file will be filled by successive calls to link_module and link_extra_test diff --cc bin/salomeContext.py index 0d12eca56,92878a52a..f80d71481 --- a/bin/salomeContext.py +++ b/bin/salomeContext.py @@@ -128,9 -128,7 +128,9 @@@ class SalomeContext absoluteAppliPath = os.getenv('ABSOLUTE_APPLI_PATH','') env_copy = os.environ.copy() - selfBytes= pickle.dumps(self,protocol=0) - argsBytes= pickle.dumps(args,protocol=0) - proc = subprocess.Popen(['python', os.path.join(absoluteAppliPath,"bin","salome","salomeContext.py"), selfBytes.decode(), argsBytes.decode()], shell=False, close_fds=True, env=env_copy) - proc = subprocess.Popen(['python', os.path.join(absoluteAppliPath,"bin","salome","salomeContext.py"), pickle.dumps(self), pickle.dumps(args)], shell=False, close_fds=True, env=env_copy) ++ selfBytes= pickle.dumps(self, protocol=0) ++ argsBytes= pickle.dumps(args, protocol=0) ++ proc = subprocess.Popen(['python3', os.path.join(absoluteAppliPath,"bin","salome","salomeContext.py"), selfBytes.decode(), argsBytes.decode()], shell=False, close_fds=True, env=env_copy) out, err = proc.communicate() return out, err, proc.returncode # @@@ -263,18 -261,18 +263,18 @@@ try: res = getattr(self, command)(options) # run appropriate method return res or 0 - except SystemExit as 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: ++ except SalomeContextException as e: ++ self.getLogger().error(e) ++ return 1 + except Exception: self.getLogger().error("Unexpected error:") import traceback traceback.print_exc() return 1 - except SalomeContextException as e: - except SalomeContextException, e: -- self.getLogger().error(e) -- return 1 # def __setContextFromConfigFile(self, filename, reserved=None):