re.match for numeric only for kwargs[key] = int(value) (#4495)
This commit is contained in:
parent
619e3bba7e
commit
c4d5b13c8f
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue