aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-09-15 02:28:22 -0400
committerJesse Luehrs <doy@tozt.net>2014-09-15 02:28:22 -0400
commitcae103673d6a8c9f34e089680cb7488b8fbd2784 (patch)
tree230b7f4c430a7a33e439a394ff6c1b720a6d096b
parent0b3542344af0d5723ba386c0cdfccd9a11eff6d6 (diff)
downloadpython-termcast-server-cae103673d6a8c9f34e089680cb7488b8fbd2784.tar.gz
python-termcast-server-cae103673d6a8c9f34e089680cb7488b8fbd2784.zip
handle line endings better
-rw-r--r--termcast.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/termcast.py b/termcast.py
index 40262e0..ca8d213 100644
--- a/termcast.py
+++ b/termcast.py
@@ -43,6 +43,9 @@ class Connection(object):
return
auth = buf[:pos]
+ if auth[-1:] == b"\r":
+ auth = auth[:-1]
+
buf = buf[pos+1:]
auth_re = re.compile(b'^hello ([^ ]+) ([^ ]+)$')