MCPcopy Index your code
hub / github.com/python/cpython / cleanup_fds

Method cleanup_fds

Lib/test/test_io/test_general.py:1139–1145  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1137 def _check_warn_on_dealloc_fd(self, *args, **kwargs):
1138 fds = []
1139 def cleanup_fds():
1140 for fd in fds:
1141 try:
1142 os.close(fd)
1143 except OSError as e:
1144 if e.errno != errno.EBADF:
1145 raise
1146 self.addCleanup(cleanup_fds)
1147 r, w = os.pipe()
1148 fds += r, w

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected