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:
a05aba1
)
Catch UnsupportedOperation.
author
Cory Benfield
<lukasaoz@gmail.com>
Sat, 3 Aug 2013 18:24:23 +0000
(19:24 +0100)
committer
Cory Benfield
<lukasaoz@gmail.com>
Sat, 3 Aug 2013 18:24:23 +0000
(19:24 +0100)
requests/models.py
patch
|
blob
|
history
diff --git
a/requests/models.py
b/requests/models.py
index
ee9c329
..
6b4a299
100644
(file)
--- a/
requests/models.py
+++ b/
requests/models.py
@@
-11,7
+11,7
@@
import collections
import logging
import datetime
-from io import BytesIO
+from io import BytesIO
, UnsupportedOperation
from .hooks import default_hooks
from .structures import CaseInsensitiveDict
@@
-385,7
+385,7
@@
class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
try:
length = super_len(data)
- except (TypeError, AttributeError):
+ except (TypeError, AttributeError
, UnsupportedOperation
):
length = None
if is_stream: