Fix syntax bugs
This commit is contained in:
parent
5f6cc7b05a
commit
12b6dfc6b7
@ -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"]:
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user