gmail: fix error when gmail.com is unreachable
ex: no internet connection Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
This commit is contained in:
parent
336ce9bbd7
commit
5869a54b20
|
@ -44,6 +44,10 @@ local function worker(format, warg)
|
||||||
-- Could be huge don't read it all at once, info we are after is at the top
|
-- Could be huge don't read it all at once, info we are after is at the top
|
||||||
local xml = f:read(2000)
|
local xml = f:read(2000)
|
||||||
|
|
||||||
|
if xml ~= nil then
|
||||||
|
return mail
|
||||||
|
end
|
||||||
|
|
||||||
mail["{count}"] = -- Count comes before messages and matches at least 0
|
mail["{count}"] = -- Count comes before messages and matches at least 0
|
||||||
tonumber(string.match(xml, "<fullcount>([%d]+)</fullcount>")) or mail["{count}"]
|
tonumber(string.match(xml, "<fullcount>([%d]+)</fullcount>")) or mail["{count}"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue