ensure progress window cleared if error on add-on import
This commit is contained in:
parent
444abfff94
commit
66cbc87580
@ -240,21 +240,23 @@ Are you sure you want to continue?"""
|
|||||||
log = []
|
log = []
|
||||||
errs = []
|
errs = []
|
||||||
self.mw.progress.start(immediate=True)
|
self.mw.progress.start(immediate=True)
|
||||||
for path in paths:
|
try:
|
||||||
base = os.path.basename(path)
|
for path in paths:
|
||||||
ret = self.install(path)
|
base = os.path.basename(path)
|
||||||
if ret[0] is False:
|
ret = self.install(path)
|
||||||
if ret[1] == "conflicts":
|
if ret[0] is False:
|
||||||
continue
|
if ret[1] == "conflicts":
|
||||||
elif ret[1] == "zip":
|
continue
|
||||||
msg = _("Corrupt add-on file.")
|
elif ret[1] == "zip":
|
||||||
elif ret[1] == "manifest":
|
msg = _("Corrupt add-on file.")
|
||||||
msg = _("Invalid add-on manifest.")
|
elif ret[1] == "manifest":
|
||||||
errs.append(_("Error installing <i>%(base)s</i>: %(error)s"
|
msg = _("Invalid add-on manifest.")
|
||||||
% dict(base=base, error=msg)))
|
errs.append(_("Error installing <i>%(base)s</i>: %(error)s"
|
||||||
else:
|
% dict(base=base, error=msg)))
|
||||||
log.append(_("Installed %(name)s" % dict(name=ret[1])))
|
else:
|
||||||
self.mw.progress.finish()
|
log.append(_("Installed %(name)s" % dict(name=ret[1])))
|
||||||
|
finally:
|
||||||
|
self.mw.progress.finish()
|
||||||
return log, errs
|
return log, errs
|
||||||
|
|
||||||
# Downloading
|
# Downloading
|
||||||
|
Loading…
Reference in New Issue
Block a user