[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:
@@ -47,7 +47,7 @@ class LNbitsWallet(Wallet):
|
||||
|
||||
try:
|
||||
data = r.json()
|
||||
except:
|
||||
except Exception:
|
||||
return StatusResponse(
|
||||
f"Failed to connect to {self.endpoint}, got: '{r.text[:200]}...'", 0
|
||||
)
|
||||
@@ -117,7 +117,7 @@ class LNbitsWallet(Wallet):
|
||||
if r.is_error:
|
||||
return PaymentStatus(None)
|
||||
return PaymentStatus(r.json()["paid"])
|
||||
except:
|
||||
except Exception:
|
||||
return PaymentStatus(None)
|
||||
|
||||
async def get_payment_status(self, checking_id: str) -> PaymentStatus:
|
||||
|
||||
Reference in New Issue
Block a user