Skip to content

Commit

Permalink
Handle missing room in dict
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-maltsev committed Dec 5, 2024
1 parent 1b5ad49 commit 1bf1509
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions courses_to_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,12 +508,7 @@ def raw_schedule_sort_key(raw_schedule):
"שישי",
]
weekday_and_time = (days.index(day), time_begin, time_end)
if weekday_and_time not in building_room_dict:
raise RuntimeError(
f"Missing weekday and time: {weekday_and_time}"
)

building, room = building_room_dict[weekday_and_time]
building, room = building_room_dict.get(weekday_and_time, ("", 0))

result_item = {
"קבוצה": group_id,
Expand Down

0 comments on commit 1bf1509

Please sign in to comment.