aboutsummaryrefslogtreecommitdiff
path: root/sjdbmk/daily.py
diff options
context:
space:
mode:
Diffstat (limited to 'sjdbmk/daily.py')
-rw-r--r--sjdbmk/daily.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/sjdbmk/daily.py b/sjdbmk/daily.py
index e708bae..4c7ad69 100644
--- a/sjdbmk/daily.py
+++ b/sjdbmk/daily.py
@@ -136,10 +136,13 @@ def generate(
breakfast_today = week_data["menu"]["Breakfast"][weekday_short]
lunch_today = week_data["menu"]["Lunch"][weekday_short]
- dinner_today = week_data["menu"]["Dinner"][weekday_short]
+ try:
+ dinner_today = week_data["menu"]["Dinner"][weekday_short]
+ except KeyError:
+ dinner_today = None
try:
breakfast_tomorrow = week_data["menu"]["Breakfast"][next_weekday_short]
- except IndexError:
+ except KeyError:
breakfast_tomorrow = None
try:
snack_morning = week_data["snacks"][0][days_since_beginning]