Fix #755 - Can't set listen_ports through console UI

This commit is contained in:
Calum Lind 2011-01-29 07:07:46 +00:00
parent e1896d2ace
commit c379b6c3b2
1 changed files with 4 additions and 1 deletions

View File

@ -60,7 +60,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':