lua-simple-uci: remove support for obsolete alternative boolean strings

This commit is contained in:
Matthias Schiffer 2017-08-08 03:58:44 +02:00
parent 0fbef92e84
commit c9fa162ebb
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
1 changed files with 2 additions and 3 deletions

View File

@ -93,7 +93,7 @@ end
function Cursor:get_bool(...)
local val = self:get(...)
return ( val == "1" or val == "true" or val == "yes" or val == "on" )
return val == "1"
end
function Cursor:get_list(config, section, option)
@ -114,8 +114,7 @@ function Cursor:get_first(conf, stype, opt, def)
if type(def) == "number" then
val = tonumber(val)
elseif type(def) == "boolean" then
val = (val == "1" or val == "true" or
val == "yes" or val == "on")
val = val == "1"
end
if val ~= nil then