From b9ff47e10f1e4f4f489a759e12eca266cb905ce4 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 29 Jan 2011 07:07:46 +0000 Subject: [PATCH] Fix #755 - Can't set listen_ports through console UI --- 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 e64923c60..3c9ddb921 100644 --- a/deluge/ui/console/commands/config.py +++ b/deluge/ui/console/commands/config.py @@ -62,7 +62,10 @@ def atom(next, token): return tuple(out) elif token[0] is tokenize.NUMBER or token[1] == "-": try: - return int(token[-1], 0) + if token[1] == "-": + return int(token[-1], 0) + else: + return int(token[1], 0) except ValueError: return float(token[-1]) elif token[1].lower() == 'true':