From 47edac6ebd93f2cbe29338c28c5265cf6fe79dc0 Mon Sep 17 00:00:00 2001 From: Trishna Guha Date: Tue, 25 Apr 2017 08:37:22 +0530 Subject: [PATCH] Remove repetition of code nxos (#23908) Signed-off-by: Trishna Guha --- lib/ansible/module_utils/nxos.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/ansible/module_utils/nxos.py b/lib/ansible/module_utils/nxos.py index b13d50574a..8f47663c19 100644 --- a/lib/ansible/module_utils/nxos.py +++ b/lib/ansible/module_utils/nxos.py @@ -89,9 +89,7 @@ def get_connection(module): global _DEVICE_CONNECTION if not _DEVICE_CONNECTION: load_params(module) - transport = module.params['transport'] - provider_transport = (module.params['provider'] or {}).get('transport') - if 'nxapi' in (transport, provider_transport): + if is_nxapi(module): conn = Nxapi(module) else: conn = Cli(module)