fix: close file handler after quitting the session

This commit is contained in:
Swann 2020-09-28 10:32:41 +02:00
parent e0839fe1fb
commit 7b13e8978b
No known key found for this signature in database
GPG Key ID: E1D3641A7C43AACB

View File

@ -304,6 +304,13 @@ class SessionStopOperator(bpy.types.Operator):
if client: if client:
try: try:
client.disconnect() client.disconnect()
logger = logging.getLogger()
for handler in logger.handlers:
if isinstance(handler, logging.FileHandler):
logger.removeHandler(handler)
except Exception as e: except Exception as e:
self.report({'ERROR'}, repr(e)) self.report({'ERROR'}, repr(e))
else: else: