]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Reset ports list in case of problem when reading PortManager file
authorCédric Aguerre <cedric.aguerre@edf.fr>
Tue, 28 Jul 2015 09:33:20 +0000 (11:33 +0200)
committerCédric Aguerre <cedric.aguerre@edf.fr>
Tue, 28 Jul 2015 09:33:20 +0000 (11:33 +0200)
bin/PortManager.py

index 8791bfc94c897ecdcd31e557760517a8122c7f22..16345298c60071e73d064ac7d0b8fd05dd8be627 100644 (file)
@@ -118,8 +118,9 @@ def getPort(preferedPort=None):
     try:
       with open(config_file, 'r') as f:
         config = pickle.load(f)
-    except IOError: # empty file
-      pass
+    except:
+      print "Problem loading PortManager file: %s"%config_file
+      # In this case config dictionary is reset
 
     logger.debug("load busy_ports: %s"%str(config["busy_ports"]))