summaryrefslogtreecommitdiff
path: root/weather-widget
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@users.noreply.github.com>2019-02-20 09:06:19 -0500
committerGitHub <noreply@github.com>2019-02-20 09:06:19 -0500
commit83fedf02938841285e22d2d8bdb88fc5f33c6b18 (patch)
treed98a442af14923d8a75da4deb9ab2ef539f2c05d /weather-widget
parent29a9761c4d0f851b75863c59854a17ea5a6d8e43 (diff)
parentf19362afdfc248f96c3513b7be1d6b22bcae75e3 (diff)
Merge pull request #69 from utix/master
Fix error when the response is empty
Diffstat (limited to 'weather-widget')
-rw-r--r--weather-widget/weather.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/weather-widget/weather.lua b/weather-widget/weather.lua
index 484c2c6..d5f07f8 100644
--- a/weather-widget/weather.lua
+++ b/weather-widget/weather.lua
@@ -97,7 +97,7 @@ weather_timer:connect_signal("timeout", function ()
.. secrets.weather_widget_city
.. '&appid=' .. secrets.weather_widget_api_key
.. '&units=' .. secrets.weather_widget_units)
- if (status ~= 200) then
+ if (status ~= 200 and resp_json ~= nil) then
local err_resp = json.decode(resp_json)
naughty.notify{
title = 'Weather Widget Error',