diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index f1c7a824e63..de903c4ffaa 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -288,7 +288,7 @@ def determine_variants(cls, exes, version_str): # 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