From: Gilles DAVID Date: Thu, 26 Oct 2017 15:39:58 +0000 (+0000) Subject: Set protocol=0 to pickle.dump in PortManager X-Git-Tag: V9_0_0~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=696c5644268485cf3bd69dabdfaaf311945dba20;p=modules%2Fkernel.git Set protocol=0 to pickle.dump in PortManager Previously, a session opened in V9 couldn't be killed by another in V8: File "PortManager.py", line 251, in getBusyPorts config = pickle.load(f) ValueError: unsupported pickle protocol: 3 --- diff --git a/bin/PortManager.py b/bin/PortManager.py index b135ab3b4..c842c7e71 100644 --- a/bin/PortManager.py +++ b/bin/PortManager.py @@ -177,7 +177,7 @@ def getPort(preferedPort=None): logger.debug("write config: %s"%str(config)) try: with open(config_file, 'wb') as f: - pickle.dump(config, f) + pickle.dump(config, f, protocol=0) except IOError: pass @@ -224,7 +224,7 @@ def releasePort(port): logger.debug("write config: %s"%str(config)) try: with open(config_file, 'wb') as f: - pickle.dump(config, f) + pickle.dump(config, f, protocol=0) except IOError: pass