Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix correction of ansi characters of next line #3288

Conversation

k-ribot
Copy link
Contributor

@k-ribot k-ribot commented Sep 5, 2023

Some time the character ANSI "^J" is returned by Zyxel router. We need to replace it by new line because with it the prompt found is wrong.

Example of output:

ZySH> 
ZySH> sys atsh
Firmware Version        : V5.50(ABPM.5)C0
Bootbase Version        : V1.46 | 12/02/2020 19:26:12
Vendor Name             : Zyxel Communications Corp.
Product Model           : VMG3625-T50B
Serial Number           : S210Y22036929
First MAC Address       : 5C648E13D570
Last MAC Address        : 5C648E13D57F
MAC Address Quantity    : 16
Default Country Code    : E1
Boot Module Debug Flag  : 00
Kernel Checksum         : 216D97EA
RootFS Checksum         : 662A48BE
Romfile Checksum        : 0000F4A1
Main Feature Bits       : 00
Other Feature Bits      : 
7fd9127d: 04050503 00000100 00000000 00000000
7fd9128d: 00000000 00000000 00000000 0000
ZySH> ^Jsys atsh
ZySH> 

So we have this error:
Pattern not detected: '\\^J' in output.

@k-ribot k-ribot force-pushed the fix-correction-of-ansi-characters-of-next-line branch from 54aa193 to 9dee344 Compare September 5, 2023 14:10
@ktbyers
Copy link
Owner

ktbyers commented Sep 5, 2023

@k-ribot Why do we need to change the class Zyxel is inheriting from?

Also can you print out a repr of the output?

print(repr(output))

I am concerned we will break other things in the driver (if we change the parent class of the driver).

@ktbyers
Copy link
Owner

ktbyers commented Oct 17, 2023

Closing as there was no response to the question of changing the parent class.

@ktbyers ktbyers closed this Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants