summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-05-09 12:51:01 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-05-09 12:51:01 +0000
commitfd0510049a0283a86f61d8c74fa549f06da38407 (patch)
tree56aee737278122d42fb48bedfc6306a2c1e9ecd6 /modules/admin-full
parentdf63ade849ad056112466f4c4653f8e4cbdacf9f (diff)
modules/admin-full: fix possible error in led page
Diffstat (limited to 'modules/admin-full')
-rw-r--r--modules/admin-full/luasrc/model/cbi/admin_system/leds.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_system/leds.lua b/modules/admin-full/luasrc/model/cbi/admin_system/leds.lua
index 053a5debbf..b912f5ece8 100644
--- a/modules/admin-full/luasrc/model/cbi/admin_system/leds.lua
+++ b/modules/admin-full/luasrc/model/cbi/admin_system/leds.lua
@@ -121,8 +121,8 @@ end
for p in nixio.fs.glob("/sys/bus/usb/devices/[0-9]*/manufacturer") do
local id = p:match("%d+-%d+")
- local mf = nixio.fs.readfile("/sys/bus/usb/devices/" .. id .. "/manufacturer")
- local pr = nixio.fs.readfile("/sys/bus/usb/devices/" .. id .. "/product")
+ local mf = nixio.fs.readfile("/sys/bus/usb/devices/" .. id .. "/manufacturer") or "?"
+ local pr = nixio.fs.readfile("/sys/bus/usb/devices/" .. id .. "/product") or "?"
usbdev:value(id, "%s (%s - %s)" %{ id, mf, pr })
end