diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/docs/packaging_guide.rst | 3 | ||||
-rw-r--r-- | lib/spack/spack/modules/common.py | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 647c38b6ec..17d7cffed4 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -2692,7 +2692,8 @@ as arguments. Here are the definitions of the three built-in flag handlers: -.. code-block:: python + def build_system_flags(self, name, flags): + return (None, None, flags) def inject_flags(pkg, name, flags): return (flags, None, None) diff --git a/lib/spack/spack/modules/common.py b/lib/spack/spack/modules/common.py index 87ad261121..482c3e1321 100644 --- a/lib/spack/spack/modules/common.py +++ b/lib/spack/spack/modules/common.py @@ -487,7 +487,7 @@ class BaseContext(tengine.Context): 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 |