From 50133f1ed6cbb210c5a4fd8691a51304aac17041 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) --- network/junos/junos_command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network/junos/junos_command.py b/network/junos/junos_command.py index ddfab906bb6..6a7f47c6951 100644 --- a/network/junos/junos_command.py +++ b/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)