commit: fa26afafd877ec655ab40c42e83a92c9be9d279c
parent: 3a57a1a0d096f9b15eab14c65c9c2bab432097d5
Author: Adam Tauber <asciimoo@gmail.com>
Date: Sat, 21 Jan 2017 20:08:08 +0100
[fix] handle missing mapsettings
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git 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):