Changeset 6027

Show
Ignore:
Timestamp:
04/05/10 18:44:57 (3 years ago)
Author:
jow
Message:

luci-0.9: fix various uvl issues

Location:
luci/branches/luci-0.9/libs/uvl
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • luci/branches/luci-0.9/libs/uvl/luasrc/uvl.lua

    r5864 r6027  
    279279        for k, v in pairs(section:config()) do 
    280280            local oo = section:option(k) 
    281             if k:byte(1) == 46 and not self.beenthere[oo:cid()] then 
     281            if k:byte(1) ~= 46 and not self.beenthere[oo:cid()] then 
    282282                section:error(ERR('OPT_UNKNOWN', oo)) 
    283283            end 
  • luci/branches/luci-0.9/libs/uvl/luasrc/uvl/errors.lua

    r5912 r6027  
    2020local string = require "string" 
    2121 
    22 local luci, tonumber, unpack, ipairs, type = 
    23     luci, tonumber, unpack, ipairs, type 
     22local luci, tonumber, tostring, unpack, ipairs, type = 
     23    luci, tonumber, tostring, unpack, ipairs, type 
    2424 
    2525module "luci.uvl.errors" 
     
    129129        :gsub("%%S", self.stype   or '(nil)') 
    130130        :gsub("%%o", self.option  or '(nil)') 
    131         :gsub("%%v", self.value  or '(nil)') 
     131        :gsub("%%v", self.value  and tostring(self.value) or '(nil)') 
    132132        :gsub("%%t", self.object and self.object:type()  or '(nil)' ) 
    133133        :gsub("%%T", self.object and self.object:title() or '(nil)' ) 
  • luci/branches/luci-0.9/libs/uvl/root/usr/bin/uvl

    r4084 r6027  
    217217 
    218218        ok, err = uvl:validate_config( cso[1], uci:get_all(cso[1]) ) 
    219         if err then err.code = luci.uvl.errors.ERR_SCHEME end 
     219        if err then err.code = 'SCHEME' end 
    220220    else 
    221221        ok, err = uvl:validate( unpack(cso) )