From c4d5b13c8f7a187fe1f1bb9eaf3e656c70323b5a Mon Sep 17 00:00:00 2001 From: codyrat Date: Mon, 22 Aug 2016 15:00:33 -0400 Subject: [PATCH] re.match for numeric only for kwargs[key] = int(value) (#4495) --- lib/ansible/modules/network/junos/junos_command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/network/junos/junos_command.py b/lib/ansible/modules/network/junos/junos_command.py index ddfab906bb6..6a7f47c6951 100644 --- a/lib/ansible/modules/network/junos/junos_command.py +++ b/lib/ansible/modules/network/junos/junos_command.py @@ -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)