Added "raw_string" (unformatted, no stripping) as a property on commands, inspired by work by user Kelketek.

This commit is contained in:
Griatch 2012-06-23 11:03:16 +02:00
parent f0f240b7ce
commit ca0920e635
2 changed files with 5 additions and 3 deletions

View file

@ -101,8 +101,8 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
logger.log_trace()
# if we get to this point the command must end with a linebreak.
# We make sure to add it, to fix some clients messing this up.
data = data.rstrip("\r\n") + "\r\n"
#print "line mode: (%s)" % data
data = data.rstrip("\r\n") + "\n"
#print "line data in:", repr(data)
StatefulTelnetProtocol.dataReceived(self, data)
def _write(self, data):