diff --git a/multi_user/operators.py b/multi_user/operators.py index d1c442b..c445a31 100644 --- a/multi_user/operators.py +++ b/multi_user/operators.py @@ -239,6 +239,11 @@ class SessionStartOperator(bpy.types.Operator): bpy.app.handlers.depsgraph_update_post.remove( depsgraph_evaluation) + logger = logging.getLogger() + for handler in logger.handlers: + if isinstance(handler, logging.FileHandler): + logger.removeHandler(handler) + bpy.ops.session.apply_armature_operator() self.report( @@ -305,12 +310,6 @@ class SessionStopOperator(bpy.types.Operator): try: client.disconnect() - logger = logging.getLogger() - - for handler in logger.handlers: - if isinstance(handler, logging.FileHandler): - logger.removeHandler(handler) - except Exception as e: self.report({'ERROR'}, repr(e)) else: