Requests 2.3.0

This commit is contained in:
Ruud committed 2014-05-29 20:01:22 +02:00
1 parent c094120f04
commit e714604ec0
70 files changed
+1463 -963

No files matched your search

@@ -0,0 +1,13 @@
def is_fp_closed(obj):
"""
Checks whether a given file-like object is closed.
:param obj:
The file-like object to check.
"""
if hasattr(obj, 'fp'):
# Object is a container for another file-like object that gets released
# on exhaustion (e.g. HTTPResponse)
return obj.fp is None
return obj.closed