From e9ed25188a1959781836763dc529883b26c74af1 Mon Sep 17 00:00:00 2001 From: Nicolas Geimer Date: Mon, 27 Mar 2017 11:53:30 +0200 Subject: [PATCH] [PY3] string, cPickle module don't exist anymore --- src/Logger/Test/TestKiller.py | 6 +++--- src/SALOMESDS/SALOMESDS_DataScopeServer.cxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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 -- 2.39.2