fix: file handler not properly closed
This commit is contained in:
parent
cb836e30f5
commit
e466f81600
@ -239,6 +239,11 @@ class SessionStartOperator(bpy.types.Operator):
|
|||||||
bpy.app.handlers.depsgraph_update_post.remove(
|
bpy.app.handlers.depsgraph_update_post.remove(
|
||||||
depsgraph_evaluation)
|
depsgraph_evaluation)
|
||||||
|
|
||||||
|
logger = logging.getLogger()
|
||||||
|
for handler in logger.handlers:
|
||||||
|
if isinstance(handler, logging.FileHandler):
|
||||||
|
logger.removeHandler(handler)
|
||||||
|
|
||||||
bpy.ops.session.apply_armature_operator()
|
bpy.ops.session.apply_armature_operator()
|
||||||
|
|
||||||
self.report(
|
self.report(
|
||||||
@ -305,12 +310,6 @@ class SessionStopOperator(bpy.types.Operator):
|
|||||||
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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user