Salome HOME
[EDF30356] : Extend management of maximum_time attribute format from pylauncher to...
[modules/kernel.git] / bin / salomeContextUtils.py.in
index e4ca05e7bd4d7ccc94c50f37a516f757fdb0a71e..71192305de34aaf0b1ec1d1330cf2097ebcf3791 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2021  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2024  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
@@ -261,9 +261,10 @@ def getScriptsAndArgs(args=None, searchPathList=None):
                 ispython = True
                 break
               pass
-            fn.close()
           except Exception:
             pass
+          finally:
+            fn.close()
           if not ispython and script_extension == ".py":
             currentKey = "@PYTHONBIN@ "+currentScript
           else: