Fix syntax bugs

This commit is contained in:
Florian Bruhin 2014-02-24 19:01:10 +01:00
parent 5f6cc7b05a
commit 12b6dfc6b7
2 changed files with 2 additions and 5 deletions

View File

@ -75,7 +75,7 @@ class AutoSearch(BoolSettingValue):
values = [("naive", "Use simple/naive check."),
("dns", "Use DNS requests (might be slow!)."),
("false": "Never search automatically.")]
("false", "Never search automatically.")]
default = "naive"
def validate(self, value):
@ -83,9 +83,6 @@ class AutoSearch(BoolSettingValue):
return True
else:
return super().validate(value)
return True
else:
return super().validate(value)
def transform(self, value):
if value.lower() in ["naive", "dns"]:

View File

@ -119,7 +119,7 @@ class IntListSettingValue(ListSettingValue):
vals = super().transform(value)
return map(int, vals)
def validate(self, value)
def validate(self, value):
try:
self.transform(value)
except ValueError: