mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-13 13:05:37 +00:00
Fix #1954 : 'invalid literal for float' console error when setting listen interface
This commit is contained in:
parent
aa0f41ac17
commit
ba60ae09d5
@ -67,7 +67,10 @@ def atom(next, token):
|
|||||||
else:
|
else:
|
||||||
return int(token[1], 0)
|
return int(token[1], 0)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return float(token[-1])
|
try:
|
||||||
|
return float(token[-1])
|
||||||
|
except ValueError:
|
||||||
|
return str(token[-1])
|
||||||
elif token[1].lower() == 'true':
|
elif token[1].lower() == 'true':
|
||||||
return True
|
return True
|
||||||
elif token[1].lower() == 'false':
|
elif token[1].lower() == 'false':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user