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

@@ -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