X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=bin%2Fappliskel%2Fsalome_starter.py;h=95f5b18c80f4e81172f737e8aac13358a0e286aa;hb=20c132438f5b8f7337bf35272989b10eb003d71c;hp=41dde839e0eabd1049fd2b8c4a6c69115b29229e;hpb=7e6982e9ccf83f3ede551d990d5a80807dcf1a87;p=modules%2Fkernel.git diff --git a/bin/appliskel/salome_starter.py b/bin/appliskel/salome_starter.py index 41dde839e..95f5b18c8 100644 --- a/bin/appliskel/salome_starter.py +++ b/bin/appliskel/salome_starter.py @@ -1,6 +1,4 @@ -#! /usr/bin/env python - -# Copyright (C) 2014, 2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2014-2023 CEA, EDF, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -53,21 +51,22 @@ def initialize(launcherPath, launcherFile): appliPath = __detectAppliPath(launcherPath, launcherFile) if appliPath is None: - print "ERROR: Unable to find application folder" - sys.exit(0) + print("ERROR: Unable to find application folder") + sys.exit(1) appliPath = os.path.relpath(appliPath, homePath) absoluteAppliPath = os.path.join(homePath, appliPath) os.environ['APPLI'] = appliPath # needed to convert .sh environment files os.environ['ABSOLUTE_APPLI_PATH'] = absoluteAppliPath + sys.path[:0] = [os.path.realpath(os.path.join(absoluteAppliPath, "bin", "salome", "test"))] sys.path[:0] = [os.path.realpath(os.path.join(absoluteAppliPath, "bin", "salome"))] # define folder to store omniorb config (initially in virtual application folder) try: from salomeContextUtils import setOmniOrbUserPath setOmniOrbUserPath() - except Exception, e: - print e + except Exception as e: + print(e) sys.exit(1) # End of preliminary work