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

reviewable/pr18780/r1
codyrat 8 years ago committed by Nathaniel Case
parent 9e241129fe
commit 50133f1ed6

@ -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)

Loading…
Cancel
Save