reformat/refactor

This commit is contained in:
2025-04-26 21:59:46 -04:00
parent 5bde6ac880
commit a433dc2fb5
14 changed files with 150 additions and 107 deletions

View File

@ -449,7 +449,8 @@ class Util:
if not fact:
raise BaseException("RandFact Src 1 Failed")
return fact
except:
except Exception as e:
logging.debug("Exception: %s", str(e))
async with await client.get(
facts_backup_url, timeout=ClientTimeout(connect=5, sock_read=5)
) as request:
@ -502,7 +503,8 @@ class Util:
self.LAST_5_COFFEES.pop() # Store no more than 5 of the last served coffees
self.LAST_5_COFFEES.append(randomCoffee)
return randomCoffee
except:
except Exception as e:
logging.debug("Exception: %s", str(e))
traceback.print_exc()
return None