From 3c32b483bc934e2f470e86dff4657bcd43dc62b1 Mon Sep 17 00:00:00 2001 From: Anil Kumar Muraleedharan Date: Wed, 9 May 2018 21:39:25 +0530 Subject: [PATCH] Fix for NameError (#39665) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue : NameError: global name ‘cnos_devicerules’ is not defined. while running cnos modules. Device Rule file validates the range and type of data going into each CLI based on device type it is executed against. This has to be backported to 2.5 --- lib/ansible/module_utils/network/cnos/cnos.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/module_utils/network/cnos/cnos.py b/lib/ansible/module_utils/network/cnos/cnos.py index 1cf59b54a2..bf42e11716 100644 --- a/lib/ansible/module_utils/network/cnos/cnos.py +++ b/lib/ansible/module_utils/network/cnos/cnos.py @@ -35,8 +35,8 @@ import time import socket import re try: - import cnos_errorcodes - import cnos_devicerules + from ansible.module_utils.network.cnos import cnos_errorcodes + from ansible.module_utils.network.cnos import cnos_devicerules HAS_LIB = True except: HAS_LIB = False