MCPcopy Create free account
hub / github.com/certbot/certbot / close

Method close

certbot/src/certbot/_internal/log.py:286–302  ·  view source on GitHub ↗

Close the handler and the temporary log file. The temporary log file is deleted if it wasn't used.

(self)

Source from the content-addressed store, hash-verified

284 super().emit(record)
285
286 def close(self) -> None:
287 """Close the handler and the temporary log file.
288
289 The temporary log file is deleted if it wasn't used.
290
291 """
292 self.acquire()
293 try:
294 # StreamHandler.close() doesn't close the stream to allow a
295 # stream like stderr to be used
296 self.stream.close()
297 if self._delete:
298 shutil.rmtree(self._workdir)
299 self._delete = False
300 super().close()
301 finally:
302 self.release()
303
304
305def pre_arg_parse_except_hook(memory_handler: MemoryHandler,

Callers 15

block_until_ssh_openFunction · 0.45
mainFunction · 0.45
setUpMethod · 0.45
stopMethod · 0.45
stopMethod · 0.45
_wait_until_readyMethod · 0.45
__init__Method · 0.45
__del__Method · 0.45
save_certificateMethod · 0.45
_save_chainFunction · 0.45

Calls 2

acquireMethod · 0.45
releaseMethod · 0.45

Tested by 15

block_until_ssh_openFunction · 0.36
mainFunction · 0.36
setUpMethod · 0.36
create_hookFunction · 0.36
test_right_modeMethod · 0.36
test_default_existsMethod · 0.36
test_basicMethod · 0.36
test_multipleMethod · 0.36
tearDownMethod · 0.36
_test_success_commonMethod · 0.36