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

This commit is contained in:
codyrat 2016-08-22 15:00:33 -04:00 committed by Matt Clay
parent 619e3bba7e
commit c4d5b13c8f

View file

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