events: don't fail on boot when geoip can't be opened

This commit is contained in:
Jens Langhammer 2021-03-11 16:38:14 +01:00
parent 828f2f8b92
commit f8dc32b387
1 changed files with 4 additions and 1 deletions

View File

@ -12,7 +12,10 @@ def get_geoip_reader() -> Optional[Reader]:
path = CONFIG.y("authentik.geoip")
if path == "" or not path:
return None
return Reader(path)
try:
return Reader(path)
except OSError:
return None
GEOIP_READER = get_geoip_reader()