Salome HOME
Merge branch 'master' into V9_dev
authorGilles DAVID <gilles-g.david@edf.fr>
Thu, 27 Jul 2017 15:28:27 +0000 (17:28 +0200)
committerGilles DAVID <gilles-g.david@edf.fr>
Thu, 27 Jul 2017 15:28:27 +0000 (17:28 +0200)
Conflicts:
bin/runConsole.py
bin/runSession.py
bin/salomeContext.py
bin/setenv.py

1  2 
bin/runConsole.py
bin/setenv.py
src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py

index 1788b206c96b5344d00325bcd4bc944bef1ef4ae,9639291f7f182d730a2e301f360dd7e40c74199d..78e12ee2eac74881b9e74922e624637016373fa6
@@@ -215,9 -214,7 +215,9 @@@ def connect(args=None, env=None)
      import subprocess
      absoluteAppliPath = os.getenv('ABSOLUTE_APPLI_PATH','')
      env_copy = os.environ.copy()
-     cmdDump=pickle.dumps(cmd,protocol=0)
-     cmdString=cmdDump.decode()
-     proc = subprocess.Popen(['python', os.path.join(absoluteAppliPath,"bin","salome","runConsole.py"), cmdString], shell=False, close_fds=True, env=env_copy)
 -    proc = subprocess.Popen(['python', os.path.join(absoluteAppliPath,"bin","salome","runConsole.py"), pickle.dumps(cmd)], shell=False, close_fds=True, env=env_copy)
++    cmdDump = pickle.dumps(cmd, protocol=0)
++    cmdString = cmdDump.decode()
++    proc = subprocess.Popen(['python3', os.path.join(absoluteAppliPath,"bin","salome","runConsole.py"), cmdString], shell=False, close_fds=True, env=env_copy)
      proc.communicate()
      return proc.returncode
  #
diff --cc bin/setenv.py
index d699fae273c434401aa5ebd1dac29f5c3d1ea315,242f492cd37493fd6bb8fffd3baec901c0c70d31..e36481da8f4025219e83eb7da52d65a1c4579f37
@@@ -88,15 -89,24 +88,17 @@@ def get_config(silent=False, exeName=No
  
      # read args from launch configure xml file and command line options
  
 -    #*** Test additional option
 -    #*** import optparse
 -    #*** help_str = "Test options addition."
 -    #*** o_j = optparse.Option("-j", "--join", action="store_true", dest="join", help=help_str)
      import launchConfigureParser
      args = launchConfigureParser.get_env(exeName=exeName)
  
 -    #*** Test additional option
 -    #*** args = launchConfigureParser.get_env([o_j])
 -    #*** if args.has_key("join"): print args["join"]
      # Check variables <module>_ROOT_DIR
      # and set list of used modules (without KERNEL)
  
      modules_list = []
 -    if args.has_key("modules"):
 +    if "modules" in args:
-         modules_list += args["modules"]
+         modules_list += [a for a in args["modules"] if a.strip()]
      # KERNEL must be last in the list to locate it at the first place in PATH
      if args["gui"] :
          modules_list[:0] = ["GUI"]
@@@ -175,8 -185,8 +177,8 @@@ def set_env(args, modules_list, modules
                       "LD_LIBRARY_PATH")
              add_path(os.path.join(module_root_dir,"bin",salome_subdir),
                       "PATH")
 -            if os.path.exists(module_root_dir + "/examples") :
 +            if os.path.exists(os.path.join(module_root_dir, "examples")):
-                 add_path(os.path.join(module_root_dir, "examples"),
+                 add_path(os.path.join(module_root_dir,"examples"),
                           "PYTHONPATH")
                  pass
              add_path(os.path.join(module_root_dir,"bin",salome_subdir),
  
      # set trace environment variable
  
 -    if not os.environ.has_key("SALOME_trace"):
 +    if "SALOME_trace" not in os.environ:
          os.environ["SALOME_trace"]="local"
      if args['file']:
-         os.environ["SALOME_trace"] = "file:" + args['file'][0]
+         os.environ["SALOME_trace"]="file:"+args['file'][0]
      if args['logger']:
          os.environ["SALOME_trace"]="with_logger"
  
index 2f7d481cddb0475c42b53a78056fda012b50f24a,b0800d53d335676ae4d644d1bc877e5239c00f94..e4ad078635075f18e8166b6b37ff670ff42e4a1c
@@@ -44,10 -44,10 +44,10 @@@ try 
      engine=lcc.FindComponent(param,'SalomeTestComponent')
      engine.Coucou(1)
  except :
 -    print 'lcc.FindOrLoad_Component("FactoryServer","SalomeTestComponent") failed'
 +    print('lcc.FindOrLoad_Component("FactoryServer","SalomeTestComponent") failed')
  
  import sys
- import CORBA
from omniORB import CORBA
  import CosNaming
  orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
  obj = orb.resolve_initial_references("NameService")