summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/package.py4
1 files 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