From 69a790fd6e40c7c8cddc805e5081308561c38922 Mon Sep 17 00:00:00 2001 From: Jason Pack Date: Mon, 6 Feb 2017 14:24:37 -0500 Subject: [PATCH] Update junos.py Called .keys() once instead of 10 times. --- salt/proxy/junos.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/salt/proxy/junos.py b/salt/proxy/junos.py index a2b7b58f76..45b104ee8b 100644 --- a/salt/proxy/junos.py +++ b/salt/proxy/junos.py @@ -58,8 +58,9 @@ def init(opts): 'ssh_config', 'normalize' ] + proxy_keys = opts['proxy'].keys() for arg in optional_args: - if arg in opts['proxy'].keys(): + if arg in proxy_keys: args[arg] = opts['proxy'][arg] thisproxy['conn'] = jnpr.junos.Device(**args)