projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53d60ca
)
Fix out-of-range issue with iter_lines (#515).
author
Antony Chazapis
<chazapis@gmail.com>
Wed, 2 May 2012 13:51:19 +0000
(16:51 +0300)
committer
Antony Chazapis
<chazapis@gmail.com>
Wed, 2 May 2012 13:51:19 +0000
(16:51 +0300)
requests/models.py
patch
|
blob
|
history
diff --git
a/requests/models.py
b/requests/models.py
index
ff0ef01
..
0143b87
100644
(file)
--- a/
requests/models.py
+++ b/
requests/models.py
@@
-751,7
+751,7
@@
class Response(object):
chunk = pending + chunk
lines = chunk.splitlines()
- if lines[-1][-1] == chunk[-1]:
+ if lines
and lines[-1] and chunk and lines
[-1][-1] == chunk[-1]:
pending = lines.pop()
else:
pending = None