summaryrefslogtreecommitdiffstats
path: root/Lib/httplib.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-05-16 15:58:41 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-05-16 15:58:41 (GMT)
commit80573bb90200423a6d1760f87bc9e05b129bd09a (patch)
tree1e0ae2edc1d76b04a792af2bbe9379e52a6d533e /Lib/httplib.py
parentb70091a8d5014b1c5d8738c17ae801d79dd5392d (diff)
downloadcpython-80573bb90200423a6d1760f87bc9e05b129bd09a.zip
cpython-80573bb90200423a6d1760f87bc9e05b129bd09a.tar.gz
cpython-80573bb90200423a6d1760f87bc9e05b129bd09a.tar.bz2
Issue #15267: HTTPConnection.request() now is compatibile with old-style
classes (such as TemporaryFile). Original patch by Atsuo Ishimoto.
Diffstat (limited to 'Lib/httplib.py')
-rw-r--r--Lib/httplib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py
index 9f1e088..30fc525 100644
--- a/Lib/httplib.py
+++ b/Lib/httplib.py
@@ -1063,7 +1063,7 @@ class HTTPConnection:
elif body is not None:
try:
thelen = str(len(body))
- except TypeError:
+ except (TypeError, AttributeError):
# If this is a file-like object, try to
# fstat its file descriptor
try: