]> SALOME platform Git repositories - modules/yacs.git/commitdiff
Salome HOME
Set protocol=0 to pickle.dump in PortManager
authorGilles DAVID <gilles-g.david@edf.fr>
Thu, 26 Oct 2017 15:39:58 +0000 (15:39 +0000)
committerGilles DAVID <gilles-g.david@edf.fr>
Thu, 26 Oct 2017 15:40:00 +0000 (15:40 +0000)
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

bin/PortManager.py

index b135ab3b4a44e3faf03750513997e3bad8973c1f..c842c7e71ae1c0d8e8786c181e8bc88f792f9893 100644 (file)
@@ -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