summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2014-02-18 19:06:53 +0000
committerCalum Lind <calumlind+deluge@gmail.com>2014-02-18 19:22:12 +0000
commitd04af1e3926baeba55104bc8fc588c1bbdb9273b (patch)
tree85d505baebb20d22d5a0f94dd4aa9806b9d0104e
parentc620ddcba0fd66d58a654d14834b1309fc52b532 (diff)
downloaddeluge-d04af1e3926baeba55104bc8fc588c1bbdb9273b.tar.gz
deluge-d04af1e3926baeba55104bc8fc588c1bbdb9273b.tar.bz2
deluge-d04af1e3926baeba55104bc8fc588c1bbdb9273b.zip
[#2343] Fix error if listen interface is whitespace
Whitespace in the interface dialog is not obvious to the user so strip in core to prevent error from bad config
-rw-r--r--deluge/core/preferencesmanager.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/deluge/core/preferencesmanager.py b/deluge/core/preferencesmanager.py
index 02665a7c1..eee384a83 100644
--- a/deluge/core/preferencesmanager.py
+++ b/deluge/core/preferencesmanager.py
@@ -251,7 +251,7 @@ class PreferencesManager(component.Component):
# Only set the listen ports if random_port is not true
if self.config["random_port"] is not True:
log.debug("listen port range set to %s-%s", value[0], value[1])
- self.session.listen_on(value[0], value[1], str(self.config["listen_interface"]))
+ self.session.listen_on(value[0], value[1], str(self.config["listen_interface"]).strip())
def _on_set_listen_interface(self, key, value):
# Call the random_port callback since it'll do what we need
@@ -273,7 +273,7 @@ class PreferencesManager(component.Component):
# Set the listen ports
log.debug("listen port range set to %s-%s", listen_ports[0],
listen_ports[1])
- self.session.listen_on(listen_ports[0], listen_ports[1], str(self.config["listen_interface"]))
+ self.session.listen_on(listen_ports[0], listen_ports[1], str(self.config["listen_interface"]).strip())
def _on_set_outgoing_ports(self, key, value):
if not self.config["random_outgoing_ports"]: