From: Cédric Aguerre Date: Tue, 28 Jul 2015 09:33:20 +0000 (+0200) Subject: Reset ports list in case of problem when reading PortManager file X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=658f5472ccfb1584fc3b10dbc7a62970bea18e4a;p=modules%2Fyacs.git Reset ports list in case of problem when reading PortManager file --- diff --git a/bin/PortManager.py b/bin/PortManager.py index 8791bfc94..16345298c 100644 --- a/bin/PortManager.py +++ b/bin/PortManager.py @@ -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"]))