From ba60ae09d5e8bf167aebec196dcb9944019241bd Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Tue, 31 Jan 2012 02:08:01 +0000 Subject: [PATCH] Fix #1954 : 'invalid literal for float' console error when setting listen interface --- deluge/ui/console/commands/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deluge/ui/console/commands/config.py b/deluge/ui/console/commands/config.py index 3c9ddb921..b72092c5f 100644 --- a/deluge/ui/console/commands/config.py +++ b/deluge/ui/console/commands/config.py @@ -67,7 +67,10 @@ def atom(next, token): else: return int(token[1], 0) except ValueError: - return float(token[-1]) + try: + return float(token[-1]) + except ValueError: + return str(token[-1]) elif token[1].lower() == 'true': return True elif token[1].lower() == 'false':