check if node is already deleted (#2799)
* check if node is already deleted * fix variable name
This commit is contained in:
parent
190a5b575c
commit
a1f7006400
@ -1388,8 +1388,9 @@ def _replace_with(self, concrete):
|
||||
dependent = dep_spec.parent
|
||||
deptypes = dep_spec.deptypes
|
||||
|
||||
# remove self from all dependents.
|
||||
del dependent._dependencies[self.name]
|
||||
# remove self from all dependents, unless it is already removed
|
||||
if self.name in dependent._dependencies:
|
||||
del dependent._dependencies[self.name]
|
||||
|
||||
# add the replacement, unless it is already a dep of dependent.
|
||||
if concrete.name not in dependent._dependencies:
|
||||
|
Loading…
Reference in New Issue
Block a user