summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorscheibelp <scheibel1@llnl.gov>2017-10-04 17:14:58 -0700
committerGitHub <noreply@github.com>2017-10-04 17:14:58 -0700
commit395000c3856cb9d61c9bb58960e6f19884444132 (patch)
tree72387033e51c143498480aadc92d1cef71a67ac0 /lib
parent44fbf95dd4693be44e816a7934c14d9c6a0852bf (diff)
downloadspack-395000c3856cb9d61c9bb58960e6f19884444132.tar.gz
spack-395000c3856cb9d61c9bb58960e6f19884444132.tar.bz2
spack-395000c3856cb9d61c9bb58960e6f19884444132.tar.xz
spack-395000c3856cb9d61c9bb58960e6f19884444132.zip
spec.patches: fix dictionary reference (#5608)
This fixes a loop that was iterating through the keys of a dictionary when it was intending to use the values.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/spec.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 8d5a1ec8df..2e144fc80f 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -2535,8 +2535,9 @@ class Spec(object):
# if not found in this package, check immediate dependents
# for dependency patches
- for dep in self._dependents:
- patch = dep.parent.package.lookup_patch(sha256)
+ for dep_spec in self._dependents.values():
+ patch = dep_spec.parent.package.lookup_patch(sha256)
+
if patch:
patches.append(patch)