From b285dc1f4f7695a14968b9a340ab5a2a23a41d3d Mon Sep 17 00:00:00 2001 From: Anil Kumar Muraleedharan Date: Fri, 15 Sep 2017 12:39:48 +0530 Subject: [PATCH] Resolving bug on CNOS Image download on multiple devices. (cherry picked from commit 1921eaf09622b01eaaddf084b4ef8733609ca386) --- lib/ansible/module_utils/cnos.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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