loguru warnings (#751)

This commit is contained in:
calle 2022-07-17 22:25:37 +02:00 committed by GitHub
parent c8ab2859fd
commit f4580955b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -231,7 +231,7 @@ async def redeem_lnurl_withdraw(
conn=conn, conn=conn,
) )
except: except:
logger.warn( logger.warning(
f"failed to create invoice on redeem_lnurl_withdraw from {lnurl}. params: {res}" f"failed to create invoice on redeem_lnurl_withdraw from {lnurl}. params: {res}"
) )
return None return None

View file

@ -395,7 +395,7 @@ async def api_payment(payment_hash, X_Api_Key: Optional[str] = Header(None)):
wallet = None wallet = None
try: try:
if X_Api_Key.extra: if X_Api_Key.extra:
logger.warn("No key") logger.warning("No key")
except: except:
wallet = await get_wallet_for_key(X_Api_Key) wallet = await get_wallet_for_key(X_Api_Key)
payment = await get_standalone_payment( payment = await get_standalone_payment(

View file

@ -281,7 +281,7 @@ async def btc_price(currency: str) -> float:
if not rates: if not rates:
return 9999999999 return 9999999999
elif len(rates) == 1: elif len(rates) == 1:
logger.warn("Could only fetch one Bitcoin price.") logger.warning("Could only fetch one Bitcoin price.")
return sum([rate for rate in rates]) / len(rates) return sum([rate for rate in rates]) / len(rates)