Special-case a curl connection timeout @ widget

This is a follow-up for #169.
This commit is contained in:
Sviatoslav Sydorenko 2020-07-16 10:46:02 +02:00
parent 14af203e28
commit f507a2c43f
No known key found for this signature in database
GPG Key ID: 9345E8FEA89CA455
1 changed files with 4 additions and 1 deletions

View File

@ -393,7 +393,10 @@ local function worker(args)
local function update_widget(widget, stdout, stderr)
if stderr ~= '' then
if not warning_shown then
if stderr ~= 'curl: (52) Empty reply from server' then
if (
stderr ~= 'curl: (52) Empty reply from server' and
stderr ~= 'curl: (28) Failed to connect to api.openweathermap.org port 443: Connection timed out'
) then
show_warning(stderr)
end
warning_shown = true