]> 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:10:03 +0000 (18:10 +0200)
committercopycat-killer <dada@archlinux.info>
Wed, 5 Aug 2015 11:31:15 +0000 (13:31 +0200)
widgets/weather.lua

index c69d02bfb90dd4191f05e06126ea125e686a983d..7223c29697213f5142b6e7c22c2584c793ea2c6f 100644 (file)
@@ -75,7 +75,7 @@ local function worker(args)
             f:close()
             weather_now, pos, err = json.decode(j, 1, nil)
 
-            if not err and tonumber(weather_now["cod"]) == 200 then
+            if not err and weather_now ~= nil 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"])))