Update junos.py

Called .keys() once instead of 10 times.
This commit is contained in:
Jason Pack 2017-02-06 14:24:37 -05:00 committed by GitHub
parent cb44161eb6
commit 69a790fd6e

View File

@ -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)