From 3d1b9e4dbc31d1cf7d162de5189e858d7d5870f3 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 7 Dec 2021 22:17:17 +0100 Subject: "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. --- lib/spack/spack/cmd/buildcache.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'lib') 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() -- cgit v1.2.3-60-g2f50