[Core] Fix strip None in set_listen_on

Trying to strip None will not work so combined the check as a condition
for the strip.
This commit is contained in:
DjLegolas 2018-06-15 21:28:03 +03:00 committed by Calum Lind
parent bd78bd2643
commit 0dbbb51cff
1 changed files with 4 additions and 2 deletions

View File

@ -210,8 +210,10 @@ class PreferencesManager(component.Component):
self.config['listen_random_port'] = None
listen_ports = self.config['listen_ports']
interface = str(self.config['listen_interface'].strip())
interface = interface if interface else '0.0.0.0'
if self.config['listen_interface']:
interface = self.config['listen_interface'].strip()
else:
interface = '0.0.0.0'
log.debug(
'Listen Interface: %s, Ports: %s with use_sys_port: %s',