diff --git a/lib/spack/spack/modules/common.py b/lib/spack/spack/modules/common.py index 6feed2938ca..86abaae7c35 100644 --- a/lib/spack/spack/modules/common.py +++ b/lib/spack/spack/modules/common.py @@ -505,7 +505,7 @@ def configure_options(self): try: configure_args = getattr(pkg, attr)() return ' '.join(configure_args) - except (AttributeError, IOError, KeyError): + except (AttributeError, IOError, KeyError, NameError): # The method doesn't exist in the current spec, # or it's not usable pass