re.match for numeric only for kwargs[key] = int(value) (#4495)

pull/18777/head
codyrat 8 years ago committed by Matt Clay
parent 619e3bba7e
commit c4d5b13c8f

@ -153,7 +153,7 @@ def rpc_args(args):
key, value = arg.split('=') key, value = arg.split('=')
if str(value).upper() in ['TRUE', 'FALSE']: if str(value).upper() in ['TRUE', 'FALSE']:
kwargs[key] = bool(value) kwargs[key] = bool(value)
elif re.match(r'\d+', value): elif re.match(r'^[0-9]+$', value):
kwargs[key] = int(value) kwargs[key] = int(value)
else: else:
kwargs[key] = str(value) kwargs[key] = str(value)

Loading…
Cancel
Save