Commit 9d4b8705 authored by Denis Bilenko's avatar Denis Bilenko

slightly better error message

parent ded2ee3e
...@@ -71,11 +71,12 @@ def read_headers(fd): ...@@ -71,11 +71,12 @@ def read_headers(fd):
def iread_chunks(fd): def iread_chunks(fd):
while True: while True:
chunk_size = fd.readline().strip() line = fd.readline()
chunk_size = line.strip()
try: try:
chunk_size = int(chunk_size, 16) chunk_size = int(chunk_size, 16)
except: except:
print 'Failed to parse chunk size: %r' % chunk_size print 'Failed to parse chunk size: %r' % line
raise raise
if chunk_size == 0: if chunk_size == 0:
crlf = fd.read(2) crlf = fd.read(2)
......
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