mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 03:37:55 +00:00
cisco_wifi_ctl.py: print for output
This commit is contained in:
@@ -1323,11 +1323,12 @@ def main():
|
|||||||
|
|
||||||
command_sent = False
|
command_sent = False
|
||||||
loop_count = 0
|
loop_count = 0
|
||||||
while command_sent == False and loop_count <= 6:
|
while command_sent == False and loop_count <= 3:
|
||||||
loop_count += 1
|
loop_count += 1
|
||||||
try:
|
try:
|
||||||
i = egg.expect_exact([CCPROMPT,LEGACY_PROMPT,AREYOUSURE,'--More-- or','config paging disable',pexpect.TIMEOUT],timeout=3)
|
i = egg.expect_exact([CCPROMPT,LEGACY_PROMPT,AREYOUSURE,'--More-- or','config paging disable',pexpect.TIMEOUT],timeout=2)
|
||||||
logg.info("before {} after {}".format(egg.before.decode('utf-8', 'ignore'),egg.after.decode('utf-8', 'ignore')))
|
logg.info("before {} after {}".format(egg.before.decode('utf-8', 'ignore'),egg.after.decode('utf-8', 'ignore')))
|
||||||
|
print(egg.before.decode('utf-8', 'ignore'))
|
||||||
if i == 0:
|
if i == 0:
|
||||||
logg.info("{} prompt received after command sent".format(CCPROMPT))
|
logg.info("{} prompt received after command sent".format(CCPROMPT))
|
||||||
# granted the break will exit the loop
|
# granted the break will exit the loop
|
||||||
@@ -1336,6 +1337,7 @@ def main():
|
|||||||
if i == 1:
|
if i == 1:
|
||||||
logg.info("{} prompt received after command sent".format(LEGACY_PROMPT))
|
logg.info("{} prompt received after command sent".format(LEGACY_PROMPT))
|
||||||
# granted the break will exit the loop
|
# granted the break will exit the loop
|
||||||
|
if loop_count > 2:
|
||||||
command_sent = True
|
command_sent = True
|
||||||
break
|
break
|
||||||
if i == 2:
|
if i == 2:
|
||||||
@@ -1348,7 +1350,7 @@ def main():
|
|||||||
if i == 4:
|
if i == 4:
|
||||||
egg.sendline(NL)
|
egg.sendline(NL)
|
||||||
logg.info("received config paging disable exiting")
|
logg.info("received config paging disable exiting")
|
||||||
#command_sent = True
|
|
||||||
if i == 5:
|
if i == 5:
|
||||||
egg.sendline(NL)
|
egg.sendline(NL)
|
||||||
logg.info(" Check to see if logging to console is disabled")
|
logg.info(" Check to see if logging to console is disabled")
|
||||||
|
|||||||
Reference in New Issue
Block a user