+ logger.debug("load config: %s"%str(config))
+ appli_path = os.getenv("ABSOLUTE_APPLI_PATH", "unknown")
+ try:
+ config[appli_path]
+ except KeyError:
+ config[appli_path] = []
+
+ # Scan all possible ports to determine which ones are owned by other applications
+ ports_info = { 'this': [], 'other': [] }
+ my_busy_ports = config[appli_path]
+ for port in range(__PORT_MIN_NUMBER, __PORT_MAX_NUMBER):
+ if __isPortUsed(port, config):
+ logger.debug("Port %s seems to be busy"%str(port))
+ if port in my_busy_ports:
+ ports_info["this"].append(port)
+ else:
+ ports_info["other"].append(port)
+
+ logger.debug("all busy_ports: %s"%str(ports_info))
+
+ sorted_ports = { 'this': sorted(ports_info['this']),
+ 'other': sorted(ports_info['other']) }