Don't inherit AutoSearch from bool

This commit is contained in:
Florian Bruhin 2014-02-27 22:52:52 +01:00
parent 8d726cb49e
commit c67f0c6482

View File

@ -239,11 +239,10 @@ class KeyBindingName(BaseType):
class AutoSearch(Bool): class AutoSearch(BaseType):
"""Whether to start a search when something else than an URL is entered.""" """Whether to start a search when something else than an URL is entered."""
typestr = None
valid_values = [("naive", "Use simple/naive check."), valid_values = [("naive", "Use simple/naive check."),
("dns", "Use DNS requests (might be slow!)."), ("dns", "Use DNS requests (might be slow!)."),
("false", "Never search automatically.")] ("false", "Never search automatically.")]
@ -252,7 +251,7 @@ class AutoSearch(Bool):
if self.value.lower() in ["naive", "dns"]: if self.value.lower() in ["naive", "dns"]:
return True return True
else: else:
return super().validate(self.value) return Bool.validate(self, self.value)
def transform(self, value): def transform(self, value):
if value.lower() in ["naive", "dns"]: if value.lower() in ["naive", "dns"]: