Fix first run exception
This commit is contained in:
parent
19bd10be32
commit
3dd3a2c732
1 changed files with 2 additions and 0 deletions
|
@ -39,6 +39,8 @@ class GeoIPHandler(object):
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
self.logger.error("Could not find GeoLite2 DB as: %s", self.dbfile)
|
self.logger.error("Could not find GeoLite2 DB as: %s", self.dbfile)
|
||||||
self.download()
|
self.download()
|
||||||
|
dbdate = date.fromtimestamp(stat(self.dbfile).st_ctime)
|
||||||
|
|
||||||
first_wednesday_day = [week[2:3][0] for week in monthcalendar(today.year, today.month) if week[2:3][0] != 0][0]
|
first_wednesday_day = [week[2:3][0] for week in monthcalendar(today.year, today.month) if week[2:3][0] != 0][0]
|
||||||
first_wednesday_date = date(today.year, today.month, first_wednesday_day)
|
first_wednesday_date = date(today.year, today.month, first_wednesday_day)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue