ensure progress window cleared if error on add-on import

This commit is contained in:
Damien Elmes 2019-02-27 14:08:20 +10:00
parent 444abfff94
commit 66cbc87580

View File

@ -240,6 +240,7 @@ Are you sure you want to continue?"""
log = []
errs = []
self.mw.progress.start(immediate=True)
try:
for path in paths:
base = os.path.basename(path)
ret = self.install(path)
@ -254,6 +255,7 @@ Are you sure you want to continue?"""
% dict(base=base, error=msg)))
else:
log.append(_("Installed %(name)s" % dict(name=ret[1])))
finally:
self.mw.progress.finish()
return log, errs