Skip to content

Commit

Permalink
Update timekiller.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Nurdok authored Oct 3, 2024
1 parent fc987d6 commit dec6435
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/spanreed/plugins/timekiller.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,12 @@ async def get_available_time_killers(
user, self.LAST_ASKED_BOOKS_KEY
)
if last_asked_str is not None:
last_asked = datetime.datetime.fromisoformat(
last_asked_str
)
try:
last_asked = datetime.datetime.fromisoformat(
last_asked_str
)
except TypeError:
raise last_asked_str
if datetime.datetime.now() - last_asked > datetime.timedelta(days=3):
timekillers["Books"] = self.prompt_for_currently_reading_books

Expand Down

0 comments on commit dec6435

Please sign in to comment.