Coverage for requests.packages.urllib3.util.response : 30%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" Checks whether a given file-like object is closed.
:param obj: The file-like object to check. """
# Check via the official file-like-object way. except AttributeError: pass
try: # Check if the object is a container for another file-like object that # gets released on exhaustion (e.g. HTTPResponse). return obj.fp is None except AttributeError: pass
raise ValueError("Unable to determine whether fp is closed.") |