summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2022-11-14 14:11:22 +0100
committerGitHub <noreply@github.com>2022-11-14 14:11:22 +0100
commita75af62fe39d09e05b8409e7ceb301d17e8afdc4 (patch)
treea0068cea74060bb47dd193eb5a3f4bcf95f3e48d /lib
parente4e02dbeae332e1c742f14179cbf6dbe47c8316f (diff)
downloadspack-a75af62fe39d09e05b8409e7ceb301d17e8afdc4.tar.gz
spack-a75af62fe39d09e05b8409e7ceb301d17e8afdc4.tar.bz2
spack-a75af62fe39d09e05b8409e7ceb301d17e8afdc4.tar.xz
spack-a75af62fe39d09e05b8409e7ceb301d17e8afdc4.zip
Get rid of context for exceptions outside PackageBase (#33887)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/build_environment.py2
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.