4315: Error when loading all plugins

svn: r16060
This commit is contained in:
Doug Blank 2010-10-26 11:18:03 +00:00
parent e3fdeb363d
commit 3ef961139a

View File

@ -211,7 +211,12 @@ def load_addon_file(path, callback=None):
if callback: if callback:
callback(_("Unable to open '%s'") % path) callback(_("Unable to open '%s'") % path)
return return
buffer = cStringIO.StringIO(fp.read()) try:
buffer = cStringIO.StringIO(fp.read())
except:
if callback:
callback(_("Error in reading '%s'") % path)
return
fp.close() fp.close()
# file_obj is either Zipfile or TarFile # file_obj is either Zipfile or TarFile
if path.endswith(".zip") or path.endswith(".ZIP"): if path.endswith(".zip") or path.endswith(".ZIP"):