From: Nicolas Geimer Date: Mon, 27 Mar 2017 09:53:30 +0000 (+0200) Subject: [PY3] string, cPickle module don't exist anymore X-Git-Tag: V9_0_0~25^2~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e9ed25188a1959781836763dc529883b26c74af1;p=modules%2Fkernel.git [PY3] string, cPickle module don't exist anymore --- diff --git a/src/Logger/Test/TestKiller.py b/src/Logger/Test/TestKiller.py index 7a41210ac..d84ad9db6 100644 --- a/src/Logger/Test/TestKiller.py +++ b/src/Logger/Test/TestKiller.py @@ -21,13 +21,13 @@ # 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.") diff --git a/src/SALOMESDS/SALOMESDS_DataScopeServer.cxx b/src/SALOMESDS/SALOMESDS_DataScopeServer.cxx index f55c903bc..4127b0b0e 100644 --- a/src/SALOMESDS/SALOMESDS_DataScopeServer.cxx +++ b/src/SALOMESDS/SALOMESDS_DataScopeServer.cxx @@ -274,7 +274,7 @@ void DataScopeServerBase::initializePython(int argc, char *argv[]) } _locals=PyDict_New(); PyObject *tmp(PyList_New(0)); - _pickler=PyImport_ImportModuleLevel(const_cast("cPickle"),_globals,_locals,tmp,-1); + _pickler=PyImport_ImportModuleLevel(const_cast("pickle"),_globals,_locals,tmp,-1); } void DataScopeServerBase::registerToSalomePiDict() const