Salome HOME
spns #29157 : déplacement import imp pour ne pas avoir en standard de message imp...
authorcrouzet <nicolas.crouzet@cea.fr>
Fri, 11 Mar 2022 10:53:19 +0000 (11:53 +0100)
committercrouzet <nicolas.crouzet@cea.fr>
Fri, 11 Mar 2022 10:53:19 +0000 (11:53 +0100)
src/fileEnviron.py

index 947b8ba3822985635d22bc84839f058dad55f534..5afc9e76124cff524c1a78bc82f175d44c069ec8 100644 (file)
@@ -762,7 +762,6 @@ import os
 import sys
 import subprocess
 import os.path
-import imp
 
 # Add the pwdPath to able to run the launcher after unpacking a package
 # Used only in case of a salomeTools package
@@ -837,7 +836,6 @@ import os
 import sys
 import subprocess
 import os.path
-import imp
 
 # Add the pwdPath to able to run the launcher after unpacking a package
 # Used only in case of a salomeTools package
@@ -913,6 +911,7 @@ launcher_tail_py2="""\
     extradir=out_dir_Path + r"/extra.env.d"
 
     if os.path.exists(extradir):
+        import imp
         sys.path.insert(0, os.path.join(os.getcwd(), extradir))
         for filename in sorted(
             filter(lambda x: os.path.isfile(os.path.join(extradir, x)),
@@ -966,6 +965,7 @@ launcher_tail_py3="""\
     extradir=out_dir_Path + r"/extra.env.d"
 
     if os.path.exists(extradir):
+        import imp
         sys.path.insert(0, os.path.join(os.getcwd(), extradir))
         for filename in sorted(
             filter(lambda x: os.path.isfile(os.path.join(extradir, x)),