Chore: Fix `ResourceWarning: unclosed file <_io.TextIOWrapper name=...`

pull/687/head
Andreas Motl 2022-10-08 23:59:59 +02:00
parent d895471b79
commit 5db016cfb3
1 changed files with 1 additions and 0 deletions

View File

@ -181,6 +181,7 @@ class LogCapture:
if self.__path:
# Close our file pointer
self.__buffer_ptr.close()
self.__handler.close()
if self.__delete:
try:
# Always remove file afterwards