diff options
author | Jason Sarich <sarich@mcs.anl.gov> | 2017-01-17 16:23:32 -0600 |
---|---|---|
committer | becker33 <becker33@llnl.gov> | 2017-01-17 14:23:32 -0800 |
commit | a1f7006400f693519b9bdb9dc962e442478f0791 (patch) | |
tree | b73962d67ea534cbd578a9616919a21fc05892cd | |
parent | 190a5b575ccccf81ee3e71d0048aa0b0e4753f22 (diff) | |
download | spack-a1f7006400f693519b9bdb9dc962e442478f0791.tar.gz spack-a1f7006400f693519b9bdb9dc962e442478f0791.tar.bz2 spack-a1f7006400f693519b9bdb9dc962e442478f0791.tar.xz spack-a1f7006400f693519b9bdb9dc962e442478f0791.zip |
check if node is already deleted (#2799)
* check if node is already deleted
* fix variable name
-rw-r--r-- | lib/spack/spack/spec.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index e34f2b799d..6cf80754a1 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1388,8 +1388,9 @@ class Spec(object): 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: |