Show
Ignore:
Timestamp:
05/09/11 13:51:01 (2 years ago)
Author:
jow
Message:

modules/admin-full: fix possible error in led page

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • luci/trunk/modules/admin-full/luasrc/model/cbi/admin_system/leds.lua

    r7004 r7037  
    122122for p in nixio.fs.glob("/sys/bus/usb/devices/[0-9]*/manufacturer") do 
    123123    local id = p:match("%d+-%d+") 
    124     local mf = nixio.fs.readfile("/sys/bus/usb/devices/" .. id .. "/manufacturer") 
    125     local pr = nixio.fs.readfile("/sys/bus/usb/devices/" .. id .. "/product") 
     124    local mf = nixio.fs.readfile("/sys/bus/usb/devices/" .. id .. "/manufacturer") or "?" 
     125    local pr = nixio.fs.readfile("/sys/bus/usb/devices/" .. id .. "/product")      or "?" 
    126126    usbdev:value(id, "%s (%s - %s)" %{ id, mf, pr }) 
    127127end