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"):