Artifact [a93b20adb3]
Artifact a93b20adb39d533be7343e3f97e3856c514e5a32:
- File bundle/requests/packages/urllib3/util/response.py — part of check-in [9e0065d508] at 2014-04-27 21:46:47 on branch py3 — Include `requests`, which is now used in ahttp in favour of urllib2 (user: mario, size: 354) [annotate] [blame] [check-ins using] [more...]
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