diff --git a/lib/ansible/module_utils/cnos.py b/lib/ansible/module_utils/cnos.py index 446fd8b50f6..906f2f0971c 100644 --- a/lib/ansible/module_utils/cnos.py +++ b/lib/ansible/module_utils/cnos.py @@ -3159,10 +3159,13 @@ def waitForDeviceResponse(command, prompt, timeout, obj): if(gotit != -1): flag = True except: - if prompt != "(yes/no)?": - retVal = retVal + "\n Error-101" - else: + # debugOutput(prompt) + if prompt == "(yes/no)?": retVal = retVal + elif prompt == "Password:": + retVal = retVal + else: + retVal = retVal + "\n Error-101" flag = True return retVal # EOM