diff options
author | Peter Scheibel <scheibel1@llnl.gov> | 2022-03-19 21:37:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-19 21:37:40 -0700 |
commit | 26552533be04e83e66be2c28e0eb5011cb54e8fa (patch) | |
tree | daf1e61a590ef86e94b2a3c72c03208bb46b7862 /lib | |
parent | 4b0cddb67455518eb72cb9af78b4a31e3102131e (diff) | |
download | spack-26552533be04e83e66be2c28e0eb5011cb54e8fa.tar.gz spack-26552533be04e83e66be2c28e0eb5011cb54e8fa.tar.bz2 spack-26552533be04e83e66be2c28e0eb5011cb54e8fa.tar.xz spack-26552533be04e83e66be2c28e0eb5011cb54e8fa.zip |
We were doing a check in a metaclass to ensure that Package classes weren't defining a function themselves; this check failed (erroneously) if that Package class subclassed another package class (because the check examined all superclasses and thought the definition we automatically add was an offender) (#29569)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/package.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index f1c7a824e6..de903c4ffa 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -288,7 +288,7 @@ class DetectablePackageMeta(object): # This function should not be overridden by subclasses, # as it is not designed for bespoke pkg detection but rather # on a per-platform basis - if hasattr(cls, 'platform_executables'): + if 'platform_executables' in cls.__dict__.keys(): raise PackageError("Packages should not override platform_executables") cls.platform_executables = platform_executables |