package: remove bare except statements (#5896)
This commit is contained in:
parent
328dc3d140
commit
e660611a87
@ -1076,7 +1076,7 @@ def do_patch(self):
|
||||
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 @@ def do_patch(self):
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user