"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.
This commit is contained in:
Harmen Stoppels 2021-12-07 22:17:17 +01:00 committed by GitHub
parent f81d84dfc6
commit 3d1b9e4dbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()