refactor: move rm to porcelain

This commit is contained in:
Swann 2021-06-02 11:47:41 +02:00
parent 211d0848c2
commit 4c4cf8a970
No known key found for this signature in database
GPG Key ID: E1D3641A7C43AACB
2 changed files with 5 additions and 5 deletions

@ -1 +1 @@
Subproject commit 02b5bbbd78bc784a50e811a3b4ded75700eed03e
Subproject commit b3123e51429c2db1fff710dd06aefdff4ee6abd1

View File

@ -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: