[CHORE] E722 bare exception fix (#1871)

* [CHORE] E722 bare exception fix
remove all bare exceptions from codebase and change it in `.flake8`
This commit is contained in:
dni ⚡
2023-08-16 12:17:54 +02:00
committed by GitHub
parent 3aef1605be
commit 355806608b
24 changed files with 48 additions and 50 deletions
+2 -2
View File
@@ -83,7 +83,7 @@ def hex_to_b64(hex_str: str) -> str:
def hex_to_bytes(hex_str: str) -> bytes:
try:
return bytes.fromhex(hex_str)
except:
except Exception:
return b""
@@ -289,7 +289,7 @@ class LndWallet(Wallet):
bytes_to_hex(payment.htlcs[-1].preimage),
)
return PaymentStatus(statuses[payment.status])
except: # most likely the payment wasn't found
except Exception: # most likely the payment wasn't found
return PaymentStatus(None)
return PaymentStatus(None)