From e660611a872b8e1aae425330bbcb47db7a694cb2 Mon Sep 17 00:00:00 2001 From: scheibelp Date: Mon, 23 Oct 2017 19:28:53 -0700 Subject: package: remove bare except statements (#5896) --- lib/spack/spack/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index ebb96eb739..92c4c6ed61 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -1076,7 +1076,7 @@ class PackageBase(with_metaclass(PackageMeta, object)): patch.apply(self.stage) tty.msg('Applied patch %s' % patch.path_or_url) patched = True - except: + except spack.error.SpackError: # Touch bad file if anything goes wrong. tty.msg('Patch %s failed.' % patch.path_or_url) touch(bad_file) @@ -1097,7 +1097,7 @@ class PackageBase(with_metaclass(PackageMeta, object)): # no patches are needed. Otherwise, we already # printed a message for each patch. tty.msg("No patches needed for %s" % self.name) - except: + except spack.error.SpackError: tty.msg("patch() function failed for %s" % self.name) touch(bad_file) raise -- cgit v1.2.3-70-g09d2