diff options
-rw-r--r-- | lib/spack/spack/build_environment.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index c2a61280ef..f1a1ce3dc8 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -1269,6 +1269,8 @@ def get_package_context(traceback, context=3): obj = frame.f_locals["self"] if isinstance(obj, spack.package_base.PackageBase): break + else: + return None # We found obj, the Package implementation we care about. # Point out the location in the install method where we failed. |