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)
|
patch.apply(self.stage)
|
||||||
tty.msg('Applied patch %s' % patch.path_or_url)
|
tty.msg('Applied patch %s' % patch.path_or_url)
|
||||||
patched = True
|
patched = True
|
||||||
except:
|
except spack.error.SpackError:
|
||||||
# Touch bad file if anything goes wrong.
|
# Touch bad file if anything goes wrong.
|
||||||
tty.msg('Patch %s failed.' % patch.path_or_url)
|
tty.msg('Patch %s failed.' % patch.path_or_url)
|
||||||
touch(bad_file)
|
touch(bad_file)
|
||||||
@ -1097,7 +1097,7 @@ def do_patch(self):
|
|||||||
# no patches are needed. Otherwise, we already
|
# no patches are needed. Otherwise, we already
|
||||||
# printed a message for each patch.
|
# printed a message for each patch.
|
||||||
tty.msg("No patches needed for %s" % self.name)
|
tty.msg("No patches needed for %s" % self.name)
|
||||||
except:
|
except spack.error.SpackError:
|
||||||
tty.msg("patch() function failed for %s" % self.name)
|
tty.msg("patch() function failed for %s" % self.name)
|
||||||
touch(bad_file)
|
touch(bad_file)
|
||||||
raise
|
raise
|
||||||
|
Loading…
Reference in New Issue
Block a user