Merge pull request #28 from starenka/patch-1

fixing `nil` sent to curl
This commit is contained in:
Jörg Thalheim 2017-02-17 19:09:52 +01:00 committed by GitHub
commit 25a291e4ea
1 changed files with 2 additions and 2 deletions

View File

@ -39,12 +39,12 @@ local mail = {
-- {{{ Gmail widget type
local function worker(format, warg)
-- Get info from the Gmail atom feed
local f = io.popen("curl --connect-timeout 1 -m 3 -fsn " .. helpers.shellquote(feed[1]))
local f = io.popen("curl --connect-timeout 1 -m 3 -fsn " .. helpers.shellquote(feed))
-- Could be huge don't read it all at once, info we are after is at the top
local xml = f:read(2000)
if xml ~= nil then
if xml == nil then
return mail
end