Cleaned up the ansi.py module and made it better match the the style rest of the code.

This commit is contained in:
Griatch 2010-09-05 20:59:32 +00:00
parent e125763ea5
commit 7e736d19e2
5 changed files with 91 additions and 93 deletions

View file

@ -125,11 +125,7 @@ class SessionProtocol(StatefulTelnetProtocol):
except Exception, e:
self.sendLine(str(e))
return
if markup:
message = ansi.parse_ansi(message)
else:
message = ansi.clean_ansi(message)
self.sendLine(message)
self.sendLine(ansi.parse_ansi(message, strip_ansi=not markup))
def get_character(self):
"""