From 46783ce484897f8ebd3928c1ea3e6055cee90dc8 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Wed, 15 Aug 2018 18:25:34 +0800 Subject: [PATCH] assembly: silence exception when deleting --- assembly.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/assembly.py b/assembly.py index d5b6e6e..4c973d0 100644 --- a/assembly.py +++ b/assembly.py @@ -2326,9 +2326,13 @@ def __init__(self): super(Assembly,self).__init__() def getSubObjects(self,_obj,reason): - partGroup = self.getPartGroup() - return ['{}.{}'.format(partGroup.Name,name) - for name in partGroup.getSubObjects(reason)] + # Deletion order problem may cause exception here. Just silence it + try: + partGroup = self.getPartGroup() + return ['{}.{}'.format(partGroup.Name,name) + for name in partGroup.getSubObjects(reason)] + except Exception: + pass def _collectParts(self,oldParts,newParts,partMap): for part in newParts: