]> git.madduck.net Git - etc/awesome.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

weather.forecast_update: forgot to add check on err
authorluke bonham <dada@archlinux.info>
Fri, 3 Jul 2015 16:05:22 +0000 (18:05 +0200)
committerluke bonham <dada@archlinux.info>
Fri, 3 Jul 2015 16:05:22 +0000 (18:05 +0200)
widgets/weather.lua

index d8dfd3f7f1f9a7d9d2355f624216f22d31f6b197..c69d02bfb90dd4191f05e06126ea125e686a983d 100644 (file)
@@ -75,7 +75,7 @@ local function worker(args)
             f:close()
             weather_now, pos, err = json.decode(j, 1, nil)
 
             f:close()
             weather_now, pos, err = json.decode(j, 1, nil)
 
-            if tonumber(weather_now["cod"]) == 200 then
+            if not err and tonumber(weather_now["cod"]) == 200 then
                 weather.notification_text = ''
                 for i = 1, weather_now["cnt"] do
                     local f = assert(io.popen(string.format(date_cmd, weather_now["list"][i]["dt"])))
                 weather.notification_text = ''
                 for i = 1, weather_now["cnt"] do
                     local f = assert(io.popen(string.format(date_cmd, weather_now["list"][i]["dt"])))