MCPcopy Create free account
hub / github.com/psf/cachecontrol / __is_fp_closed

Method __is_fp_closed

cachecontrol/filewrapper.py:53–69  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

51 return getattr(fp, name)
52
53 def __is_fp_closed(self) -> bool:
54 try:
55 return self.__fp.fp is None
56
57 except AttributeError:
58 pass
59
60 try:
61 closed: bool = self.__fp.closed
62 return closed
63
64 except AttributeError:
65 pass
66
67 # We just don't cache it then.
68 # TODO: Add some logging here...
69 return False
70
71 def _close(self) -> None:
72 result: Buffer

Callers 2

readMethod · 0.95
_safe_readMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected