diff options
Diffstat (limited to 'Lib/httplib.py')
-rw-r--r-- | Lib/httplib.py | 2 |
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: |