From fa26afafd877ec655ab40c42e83a92c9be9d279c Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Sat, 21 Jan 2017 20:08:08 +0100 Subject: [PATCH] [fix] handle missing mapsettings --- searx/preferences.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/searx/preferences.py b/searx/preferences.py index 3aeb87e9f..719492460 100644 --- a/searx/preferences.py +++ b/searx/preferences.py @@ -130,7 +130,8 @@ class MapSetting(Setting): self.key = data def save(self, name, resp): - resp.set_cookie(name, bytes(self.key), max_age=COOKIE_MAX_AGE) + if hasattr(self, 'key'): + resp.set_cookie(name, bytes(self.key), max_age=COOKIE_MAX_AGE) class SwitchableSetting(Setting):