Commit bb3d2075 authored by Alexander Koumis's avatar Alexander Koumis
Browse files

Prevent .strip() from being called on None

parent 51e409d1
......@@ -313,10 +313,10 @@ class Stream(object):
while self.running and not resp.raw.closed:
length = 0
while not resp.raw.closed:
line = buf.read_line().strip()
line = buf.read_line()
if not line:
self.listener.keep_alive() # keep-alive new lines are expected
elif line.isdigit():
elif line.strip().isdigit():
length = int(line)
break
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment