Merge, with input and tweaks from discussion with lagos and Kelketek in irc.

This commit is contained in:
Griatch 2012-06-13 01:36:59 +02:00
commit 80da420ee7
3 changed files with 19 additions and 9 deletions

View file

@ -108,7 +108,8 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
def _write(self, data):
"hook overloading the one used in plain telnet"
#print "_write (%s): %s" % (self.state, " ".join(str(ord(c)) for c in data))
data = data.rstrip('\r\n') + '\r\n'
data = data.replace('\n', '\r\n').replace('\r\r\n', '\r\n')
#data = data.replace('\n', '\r\n')
super(TelnetProtocol, self)._write(mccp_compress(self, data))
def sendLine(self, line):