From 658f5472ccfb1584fc3b10dbc7a62970bea18e4a Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Tue, 28 Jul 2015 11:33:20 +0200 Subject: [PATCH] Reset ports list in case of problem when reading PortManager file --- bin/PortManager.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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"])) -- 2.39.2