From 532b153e4674975cd8bd6ba7b5931aa2886b2a25 Mon Sep 17 00:00:00 2001 From: flifloo Date: Wed, 25 Dec 2019 18:00:59 +0100 Subject: [PATCH] Forget to update calendar file name --- EDTcalendar.py | 2 +- update.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/EDTcalendar.py b/EDTcalendar.py index 59f844a..2d413ec 100644 --- a/EDTcalendar.py +++ b/EDTcalendar.py @@ -35,7 +35,7 @@ class Calendar(ics.Calendar): return f"{url}?resources={resources}&projectId={projectid}&calType=ical&firstDate={firstdate}&lastDate={lastdate}" def _get_calendar(self, url: str, resources: int, projectid: int): - name = f"calendars/{url[1]}-{url[2]}.ical" + name = f"calendars/{resources}-{projectid}.ical" now = self._now().timestamp() if not isfile(name) or now-getmtime(name) < now-360: open(name, "w").write(requests.get(self._url(url, resources, projectid)).text) diff --git a/update.py b/update.py index d533cd4..cc39708 100644 --- a/update.py +++ b/update.py @@ -1,5 +1,5 @@ import shelve -from EDTuser import User +from base import User with shelve.open("edt", writeback=True) as db: for u in db: