1
0

don't use bare except

use "except Exception", or if really needed explicitly "except BaseException"
This commit is contained in:
SomberNight
2023-04-23 01:33:12 +00:00
parent 6848b8f375
commit 312f2641e7
57 changed files with 118 additions and 118 deletions

View File

@@ -622,7 +622,7 @@ class Blockchain(Logger):
return hash_header(header) == constants.net.GENESIS
try:
prev_hash = self.get_hash(height - 1)
except:
except Exception:
return False
if prev_hash != header.get('prev_block_hash'):
return False