diff --git a/deluge/core/core.py b/deluge/core/core.py index 2e35e3292..aa39ca06a 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -126,9 +126,12 @@ class Core(component.Component): # If there was an interface value from the command line, use it, but # store the one in the config so we can restore it on shutdown self.__old_interface = None - if listen_interface and deluge.common.is_ip(listen_interface): - self.__old_interface = self.config["listen_interface"] - self.config["listen_interface"] = listen_interface + if listen_interface: + if deluge.common.is_ip(listen_interface): + self.__old_interface = self.config["listen_interface"] + self.config["listen_interface"] = listen_interface + else: + log.error("Invalid listen interface (must be IP Address): %s", listen_interface) def start(self): """Starts the core""" diff --git a/deluge/core/daemon.py b/deluge/core/daemon.py index 413ea7529..3187227ad 100644 --- a/deluge/core/daemon.py +++ b/deluge/core/daemon.py @@ -98,9 +98,6 @@ class Daemon(object): return 1 SetConsoleCtrlHandler(win_handler) - if listen_interface and not is_ip(listen_interface): - listen_interface = None - # Start the core as a thread and join it until it's done self.core = Core(listen_interface=listen_interface) @@ -108,6 +105,7 @@ class Daemon(object): port = self.core.config["daemon_port"] if interface and not is_ip(interface): + log.error("Invalid UI interface (must be IP Address): %s", interface) interface = None self.rpcserver = RPCServer(