Skip to content

Commit

Permalink
Fix up some new typing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesDearlove committed Mar 9, 2024
1 parent b83f6d1 commit b7def14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion uqcsbot/dominos_coupons.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ async def dominoscoupons(
try:
coupons = _get_coupons(number_of_coupons, ignore_expiry, keywords.split())
except RequestException as error:
resp_content = error.response.content if error.response else "No response error given."
logging.warning(
f"Could not connect to dominos coupon site ({COUPONESE_DOMINOS_URL}): {error.response.content}"
f"Could not connect to dominos coupon site ({COUPONESE_DOMINOS_URL}): {resp_content}"
)
await interaction.edit_original_response(
content=f"Sadly could not reach the coupon website (<{COUPONESE_DOMINOS_URL}>)..."
Expand Down
3 changes: 2 additions & 1 deletion uqcsbot/holidays.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ def get_holiday_page() -> bytes | None:
response = requests.get(HOLIDAY_URL)
return response.content
except RequestException as e:
logging.warning(e.response.content)
resp_content = e.response.content if e.response else "No response error given."
logging.warning(f"(RequestException) Could not fetch {HOLIDAY_URL}: {resp_content}")


class Holidays(commands.Cog):
Expand Down

0 comments on commit b7def14

Please sign in to comment.