summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2021-12-07 22:17:17 +0100
committerGitHub <noreply@github.com>2021-12-07 13:17:17 -0800
commit3d1b9e4dbc31d1cf7d162de5189e858d7d5870f3 (patch)
tree9be643dfb9b5ef5cd3e9459274e4a7751d4889c6 /lib
parentf81d84dfc6b1c3a821dffab785e62ecd79f130ab (diff)
downloadspack-3d1b9e4dbc31d1cf7d162de5189e858d7d5870f3.tar.gz
spack-3d1b9e4dbc31d1cf7d162de5189e858d7d5870f3.tar.bz2
spack-3d1b9e4dbc31d1cf7d162de5189e858d7d5870f3.tar.xz
spack-3d1b9e4dbc31d1cf7d162de5189e858d7d5870f3.zip
"spack buildcache install": don't catch exception (#27674)
Remove a try/catch for an error with no handling. If the affected code doesn't execute successfully, then the associated variable is undefined and another (more-obscure) error occurs shortly after.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/cmd/buildcache.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/spack/spack/cmd/buildcache.py b/lib/spack/spack/cmd/buildcache.py
index 1fda884e9a..380d61c66a 100644
--- a/lib/spack/spack/cmd/buildcache.py
+++ b/lib/spack/spack/cmd/buildcache.py
@@ -337,10 +337,7 @@ def match_downloaded_specs(pkgs, allow_multiple_matches=False, force=False,
specs_from_cli = []
has_errors = False
- try:
- specs = bindist.update_cache_and_get_specs()
- except bindist.FetchCacheError as e:
- tty.error(e)
+ specs = bindist.update_cache_and_get_specs()
if not other_arch:
arch = spack.spec.Spec.default_arch()
@@ -572,10 +569,7 @@ def install_tarball(spec, args):
def listspecs(args):
"""list binary packages available from mirrors"""
- try:
- specs = bindist.update_cache_and_get_specs()
- except bindist.FetchCacheError as e:
- tty.error(e)
+ specs = bindist.update_cache_and_get_specs()
if not args.allarch:
arch = spack.spec.Spec.default_arch()