From 4c4cf8a970c2d15a965f878a16ee3c79c76d8767 Mon Sep 17 00:00:00 2001 From: Swann Date: Wed, 2 Jun 2021 11:47:41 +0200 Subject: [PATCH] refactor: move rm to porcelain --- multi_user/libs/replication | 2 +- multi_user/operators.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/multi_user/libs/replication b/multi_user/libs/replication index 02b5bbb..b3123e5 160000 --- a/multi_user/libs/replication +++ b/multi_user/libs/replication @@ -1 +1 @@ -Subproject commit 02b5bbbd78bc784a50e811a3b4ded75700eed03e +Subproject commit b3123e51429c2db1fff710dd06aefdff4ee6abd1 diff --git a/multi_user/operators.py b/multi_user/operators.py index 79ebe85..b57536d 100644 --- a/multi_user/operators.py +++ b/multi_user/operators.py @@ -401,7 +401,7 @@ class SessionPropertyRemoveOperator(bpy.types.Operator): def execute(self, context): try: - session.remove(self.property_path) + porcelain.rm(session.repository, self.property_path) return {"FINISHED"} except: # NonAuthorizedOperationError: @@ -907,7 +907,9 @@ def sanitize_deps_graph(remove_nodes: bool = False): or (node.state == UP and not node.instance): if remove_nodes: try: - session.remove(node.uuid, remove_dependencies=False) + porcelain.rm(session.repository, + node.uuid, + remove_dependencies=False) logging.info(f"Removing {node.uuid}") rm_cpt += 1 except NonAuthorizedOperationError: @@ -968,8 +970,6 @@ def depsgraph_evaluation(scene): porcelain.push(session.repository, 'origin', node.uuid) except ReferenceError: logging.debug(f"Reference error {node.uuid}") - # if not node.is_valid(): - # session.remove(node.uuid) except ContextError as e: logging.debug(e) except Exception as e: