summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorscheibelp <scheibel1@llnl.gov>2017-10-23 19:28:53 -0700
committerGitHub <noreply@github.com>2017-10-23 19:28:53 -0700
commite660611a872b8e1aae425330bbcb47db7a694cb2 (patch)
treef636bfcc06f8916df56bdff9a4c83f7f9f998e95 /lib
parent328dc3d14029e576f38e920a4df116af89071dfe (diff)
downloadspack-e660611a872b8e1aae425330bbcb47db7a694cb2.tar.gz
spack-e660611a872b8e1aae425330bbcb47db7a694cb2.tar.bz2
spack-e660611a872b8e1aae425330bbcb47db7a694cb2.tar.xz
spack-e660611a872b8e1aae425330bbcb47db7a694cb2.zip
package: remove bare except statements (#5896)
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