From 9d97a98b4df4e2d2d683ae50c32a6d1c68a817f1 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Fri, 15 Jan 2016 18:45:44 +0100 Subject: [PATCH] naughty: Remove dead code Since some commits, surface.load_uncached() handles errors itself and thus we don't have to print an error message here any more. Signed-off-by: Uli Schlachter --- lib/naughty/core.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/naughty/core.lua b/lib/naughty/core.lua index ee41e72b7..4c30f0311 100644 --- a/lib/naughty/core.lua +++ b/lib/naughty/core.lua @@ -562,13 +562,7 @@ function naughty.notify(args) end -- is the icon file readable? - local success, res = pcall(function() return surface.load_uncached(icon) end) - if success then - icon = res - else - io.stderr:write(string.format("naughty: Couldn't load image '%s': %s\n", tostring(icon), res)) - icon = nil - end + local icon = surface.load_uncached(icon) -- if we have an icon, use it if icon then