Changeset 7037


Ignore:
Timestamp:
May 9, 2011, 2:51:01 PM (8 years ago)
Author:
jow
Message:

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

File:
1 edited

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
Note: See TracChangeset for help on using the changeset viewer.