Fix to color normalization end tag in ssh.
Initial fix in #1243 does not account for empty string. Addresses a potential problem similar to IndexError in telnet.py #1306
This commit is contained in:
parent
f7955340a7
commit
154799f6e0
1 changed files with 1 additions and 1 deletions
|
|
@ -283,7 +283,7 @@ class SshProtocol(Manhole, session.Session):
|
|||
else:
|
||||
# we need to make sure to kill the color at the end in order
|
||||
# to match the webclient output.
|
||||
linetosend = ansi.parse_ansi(_RE_N.sub("", text) + ("|n" if text[-1] != "|" else "||n"),
|
||||
linetosend = ansi.parse_ansi(_RE_N.sub("", text) + ("||n" if text.endswith("|") else "|n"),
|
||||
strip_ansi=nocolor, xterm256=xterm256, mxp=False)
|
||||
self.sendLine(linetosend)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue