From f8dc32b387a76c33df086b0317110173fb7669ec Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 11 Mar 2021 16:38:14 +0100 Subject: [PATCH] events: don't fail on boot when geoip can't be opened --- authentik/events/geo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/authentik/events/geo.py b/authentik/events/geo.py index b249a562e..f7e2f90cb 100644 --- a/authentik/events/geo.py +++ b/authentik/events/geo.py @@ -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()