mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-04 04:12:48 +00:00
re.match for numeric only for kwargs[key] = int(value) (#4495)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user