]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
need to explicitly call python script in sub process with 'python script.py' on Windows
authormbs <martin.bernhard@opencascade.com>
Thu, 28 Mar 2024 19:45:57 +0000 (19:45 +0000)
committermbs <martin.bernhard@opencascade.com>
Wed, 24 Apr 2024 15:17:06 +0000 (16:17 +0100)
src/ExchangePlugin/Test/TestImportImage_3.py

index 82b1a89742f92b8755b9e5eb109806aa45b5d367..4de0cf850a09403785ba8f44a811fbad3d71a685 100755 (executable)
@@ -104,5 +104,9 @@ with TemporaryDirectory() as tmp_dir:
 # Close SALOME GUI
 import salome_utils
 import subprocess
+import platform
 port = salome_utils.getPortNumber()
-proc = subprocess.Popen(["killSalomeWithPort.py", "{}".format(port)])
+if platform.system() == "Windows":
+  proc = subprocess.Popen(["python", "killSalomeWithPort.py", "{}".format(port)])
+else:
+  proc = subprocess.Popen(["killSalomeWithPort.py", "{}".format(port)])