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

This commit is contained in:
Andreas Motl 2022-10-08 23:59:59 +02:00
parent d895471b79
commit 5db016cfb3

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