Merge pull request #625 from hwhw/master

fail gracefully when the Kobo light device cannot be opened
This commit is contained in:
Huang Xin
2014-06-04 22:01:00 +08:00

View File

@@ -13,7 +13,8 @@ local KoboPowerD = BasePowerD:new{
}
function KoboPowerD:init()
self.fl = kobolight.open()
local ok, light = pcall(kobolight.open)
if ok then self.fl = light end
end
function KoboPowerD:toggleFrontlight()