Skip to content

Commit

Permalink
replace getattr call with index
Browse files Browse the repository at this point in the history
  • Loading branch information
dkess committed Feb 3, 2019
1 parent 3429154 commit 1224ee8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ocflib/lab/hours2.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def _parse_regular_hours(regular):
weekday = Weekday(weekday)
else:
# Convert strings ('Monday') to int (0)
weekday = getattr(Weekday, weekday)
weekday = Weekday[weekday]

out[weekday] = _parse_hours_list(hours)

Expand Down

0 comments on commit 1224ee8

Please sign in to comment.