fix crash on no Location header when checking connection

This commit is contained in:
selfisekai 2020-09-18 18:21:59 +02:00
parent 5efee60800
commit 868cf77b89

View file

@ -54,7 +54,7 @@ class LibreFi:
self.log.info("No internet access, trying {}.unfxck()" self.log.info("No internet access, trying {}.unfxck()"
.format(self.current_fxcker.FXCKER_KEY)) .format(self.current_fxcker.FXCKER_KEY))
self.current_fxcker.unfxck( self.current_fxcker.unfxck(
location=check_req.headers["location"], location=check_req.headers.get("Location"),
) )
else: else:
self.log.debug("Internet access working") self.log.debug("Internet access working")