From 868cf77b8985ffef0c0344bc2803a0c8a1a98c26 Mon Sep 17 00:00:00 2001 From: selfisekai Date: Fri, 18 Sep 2020 18:21:59 +0200 Subject: [PATCH] fix crash on no Location header when checking connection --- librefi/librefi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/librefi/librefi.py b/librefi/librefi.py index 5221166..94cf914 100644 --- a/librefi/librefi.py +++ b/librefi/librefi.py @@ -54,7 +54,7 @@ class LibreFi: self.log.info("No internet access, trying {}.unfxck()" .format(self.current_fxcker.FXCKER_KEY)) self.current_fxcker.unfxck( - location=check_req.headers["location"], + location=check_req.headers.get("Location"), ) else: self.log.debug("Internet access working")