]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
[PY3] string, cPickle module don't exist anymore
authorNicolas Geimer <nicolas.geimer@edf.fr>
Mon, 27 Mar 2017 09:53:30 +0000 (11:53 +0200)
committerNicolas Geimer <nicolas.geimer@edf.fr>
Mon, 27 Mar 2017 09:53:30 +0000 (11:53 +0200)
src/Logger/Test/TestKiller.py
src/SALOMESDS/SALOMESDS_DataScopeServer.cxx

index 7a41210acd8e81d49824210fadc050022b33925a..d84ad9db6a2cc2a32f3d4e394921b5ef0ff889eb 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-import sys, os,signal,string,subprocess
+import sys, os,signal,subprocess
 
 def getCurrentPort():
     fic=os.environ['OMNIORB_CONFIG']
     with open(fic,'r') as f:
         line=f.readline()
-    port=string.split(line,':')[-1][0:4]
+    port=line.split(':')[-1][0:4]
     return port
 
 
@@ -52,7 +52,7 @@ def killNamingService():
     command='ps -eo pid,command | grep "omniNames -start '+str(port)+'" | grep --invert-match grep'
     output_com = subprocess.getoutput(command)
     try:
-      pid=string.split(output_com)[0]
+      pid=output_com.split()[0]
       os.kill(int(pid),signal.SIGKILL)
     except:
       print("killNamingService failed.")
index f55c903bc7524d8e77606444081a3a162e4e8b90..4127b0b0eefc68220dcf2ff90c49c3f53c534b28 100644 (file)
@@ -274,7 +274,7 @@ void DataScopeServerBase::initializePython(int argc, char *argv[])
     }
   _locals=PyDict_New();
   PyObject *tmp(PyList_New(0));
-  _pickler=PyImport_ImportModuleLevel(const_cast<char *>("cPickle"),_globals,_locals,tmp,-1);
+  _pickler=PyImport_ImportModuleLevel(const_cast<char *>("pickle"),_globals,_locals,tmp,-1);
 }
 
 void DataScopeServerBase::registerToSalomePiDict() const