From 3ef961139accf88080f3d93f6115e35d1ad86788 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Tue, 26 Oct 2010 11:18:03 +0000 Subject: [PATCH] 4315: Error when loading all plugins svn: r16060 --- src/gen/plug/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gen/plug/utils.py b/src/gen/plug/utils.py index 0bb034461..e8fccc296 100644 --- a/src/gen/plug/utils.py +++ b/src/gen/plug/utils.py @@ -211,7 +211,12 @@ def load_addon_file(path, callback=None): if callback: callback(_("Unable to open '%s'") % path) return - buffer = cStringIO.StringIO(fp.read()) + try: + buffer = cStringIO.StringIO(fp.read()) + except: + if callback: + callback(_("Error in reading '%s'") % path) + return fp.close() # file_obj is either Zipfile or TarFile if path.endswith(".zip") or path.endswith(".ZIP"):