[Core] Fix strip None in outgoing_interface

Trying to strip None will not work so do this after checks for
falseness.
This commit is contained in:
Calum Lind 2018-06-09 21:30:09 +01:00
parent b2b7703081
commit e7eb26416e

View File

@ -192,9 +192,9 @@ class PreferencesManager(component.Component):
def _on_set_outgoing_interface(self, key, value): def _on_set_outgoing_interface(self, key, value):
""" Set the adapter name for outgoing BitTorrent connections.""" """ Set the adapter name for outgoing BitTorrent connections."""
value = value.strip()
if not value or deluge.common.is_ip(value): if not value or deluge.common.is_ip(value):
value = '' value = ''
value = value.strip()
self.core.apply_session_settings({'outgoing_interfaces': value}) self.core.apply_session_settings({'outgoing_interfaces': value})
def _on_set_random_port(self, key, value): def _on_set_random_port(self, key, value):