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

@@ -297,7 +297,7 @@ def is_xpub(text):
try:
node = BIP32Node.from_xkey(text)
return not node.is_private()
except:
except Exception:
return False
@@ -305,7 +305,7 @@ def is_xprv(text):
try:
node = BIP32Node.from_xkey(text)
return node.is_private()
except:
except Exception:
return False
@@ -374,7 +374,7 @@ def is_bip32_derivation(s: str) -> bool:
if not (s == 'm' or s.startswith('m/')):
return False
convert_bip32_strpath_to_intpath(s)
except:
except Exception:
return False
else:
return True