summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@googlemail.com>2016-09-22 09:31:28 +0200
committerTodd Gamblin <tgamblin@llnl.gov>2016-09-22 00:31:28 -0700
commit1db25526445f6d8764708c39315f77be3f2d57c8 (patch)
tree52a262ddd45a8499ca4c660f4af6cfa7a7762fc6 /lib
parentd848559f70ad67842150b51d2792843f3cce4621 (diff)
downloadspack-1db25526445f6d8764708c39315f77be3f2d57c8.tar.gz
spack-1db25526445f6d8764708c39315f77be3f2d57c8.tar.bz2
spack-1db25526445f6d8764708c39315f77be3f2d57c8.tar.xz
spack-1db25526445f6d8764708c39315f77be3f2d57c8.zip
fix : stops infinite recursion for python 2.6 (#1823)
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 158d76e568..c92594da72 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -531,8 +531,9 @@ class Spec(object):
"""Delegate to self.package if the attribute is not in the spec"""
# This line is to avoid infinite recursion in case package is
# not present among self attributes
- package = super(Spec, self).__getattribute__('package')
- return getattr(package, item)
+ if item.endswith('libs'):
+ return getattr(self.package, item)
+ raise AttributeError()
def get_dependency(self, name):
dep = self._dependencies.get(name)