[kupfer: 36/41] core: Fix check for icon-list file



commit c8e7a4b8bf9693e4f04ee2e09138ec679f3fc142
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Tue Apr 26 18:45:49 2011 +0200

    core: Fix check for icon-list file
    
    Checking errno is unreliable (given multiple file/non-file modules etc).

 kupfer/core/plugins.py |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/kupfer/core/plugins.py b/kupfer/core/plugins.py
index 1ddd3e8..7d912a0 100644
--- a/kupfer/core/plugins.py
+++ b/kupfer/core/plugins.py
@@ -353,11 +353,8 @@ def _load_icons(plugin_name):
 	try:
 		icon_file = pkgutil.get_data(modname, PLUGIN_ICON_FILE)
 	except IOError as exc:
-		if exc.errno != 2:
-			pretty.print_exc(__name__)
-		else:
-			# no icon-list exists, let is pass silently
-			return
+		# icon-list file just missing, let is pass silently
+		return
 
 	def get_icon_data(basename):
 		return pkgutil.get_data(modname, basename)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]