mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Fix for cnos.py utility file for Python3.5 (#21750)
* fix in cnos.py utility file * fix compile errors in cnos.py, update module short description in cnos_vlan.py, move vlan roles under integration/roles * corrections in readme * Change module directory name to Lenovo * change import cnos statement
This commit is contained in:
committed by
John R Barker
parent
709b03d1c8
commit
e5ceb3a99c
@@ -3118,7 +3118,7 @@ def enterEnableModeForDevice(enablePassword, timeout, obj):
|
||||
flag = False
|
||||
retVal = ""
|
||||
count = 5
|
||||
while (flag is False):
|
||||
while not flag:
|
||||
# If wait time is execeeded.
|
||||
if(count == 0):
|
||||
flag = True
|
||||
@@ -3168,7 +3168,7 @@ def waitForDeviceResponse(command, prompt, timeout, obj):
|
||||
obj.send(command)
|
||||
flag = False
|
||||
retVal = ""
|
||||
while (flag is False):
|
||||
while not flag:
|
||||
time.sleep(1)
|
||||
try:
|
||||
buffByte = obj.recv(9999)
|
||||
@@ -3179,7 +3179,10 @@ def waitForDeviceResponse(command, prompt, timeout, obj):
|
||||
if(gotit != -1):
|
||||
flag = True
|
||||
except:
|
||||
retVal = retVal + "\n Error-101"
|
||||
if prompt != "(yes/no)?":
|
||||
retVal = retVal + "\n Error-101"
|
||||
else:
|
||||
retVal = retVal
|
||||
flag = True
|
||||
return retVal
|
||||
# EOM
|
||||
|
||||
Reference in New Issue
Block a user