events: don't fail on boot when geoip can't be opened
This commit is contained in:
parent
828f2f8b92
commit
f8dc32b387
|
@ -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()
|
||||
|
|
Reference in a new issue