don't use bare except
use "except Exception", or if really needed explicitly "except BaseException"
This commit is contained in:
@@ -1084,13 +1084,13 @@ def load_keystore(db: 'WalletDB', name: str) -> KeyStore:
|
||||
def is_old_mpk(mpk: str) -> bool:
|
||||
try:
|
||||
int(mpk, 16) # test if hex string
|
||||
except:
|
||||
except Exception:
|
||||
return False
|
||||
if len(mpk) != 128:
|
||||
return False
|
||||
try:
|
||||
ecc.ECPubkey(bfh('04' + mpk))
|
||||
except:
|
||||
except Exception:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user