Remove all uses of "except:"

This commit is contained in:
Neil Booth 2017-01-25 08:02:09 +09:00
parent 76b6899cf2
commit 551c04a3bc
3 changed files with 3 additions and 3 deletions

View File

@ -209,7 +209,7 @@ class Script(object):
n += dlen n += dlen
ops.append(op) ops.append(op)
except: except Exception:
# Truncated script; e.g. tx_hash # Truncated script; e.g. tx_hash
# ebc9fa1196a59e192352d76c0f6e73167046b9d37b8302b6bb6968dfd279b767 # ebc9fa1196a59e192352d76c0f6e73167046b9d37b8302b6bb6968dfd279b767
raise ScriptError('truncated script') raise ScriptError('truncated script')

View File

@ -50,7 +50,7 @@ def main():
try: try:
limit = int(sys.argv[argc]) limit = int(sys.argv[argc])
argc += 1 argc += 1
except: except Exception:
limit = 10 limit = 10
for addr in sys.argv[argc:]: for addr in sys.argv[argc:]:
print('Address: ', addr) print('Address: ', addr)

View File

@ -83,7 +83,7 @@ class Env(LoggedClass):
return default return default
try: try:
return int(value) return int(value)
except: except Exception:
raise self.Error('cannot convert envvar {} value {} to an integer' raise self.Error('cannot convert envvar {} value {} to an integer'
.format(envvar, value)) .format(envvar, value))