mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
ensure progress window cleared if error on add-on import
This commit is contained in:
parent
444abfff94
commit
66cbc87580
1 changed files with 17 additions and 15 deletions
|
@ -240,6 +240,7 @@ Are you sure you want to continue?"""
|
||||||
log = []
|
log = []
|
||||||
errs = []
|
errs = []
|
||||||
self.mw.progress.start(immediate=True)
|
self.mw.progress.start(immediate=True)
|
||||||
|
try:
|
||||||
for path in paths:
|
for path in paths:
|
||||||
base = os.path.basename(path)
|
base = os.path.basename(path)
|
||||||
ret = self.install(path)
|
ret = self.install(path)
|
||||||
|
@ -254,6 +255,7 @@ Are you sure you want to continue?"""
|
||||||
% dict(base=base, error=msg)))
|
% dict(base=base, error=msg)))
|
||||||
else:
|
else:
|
||||||
log.append(_("Installed %(name)s" % dict(name=ret[1])))
|
log.append(_("Installed %(name)s" % dict(name=ret[1])))
|
||||||
|
finally:
|
||||||
self.mw.progress.finish()
|
self.mw.progress.finish()
|
||||||
return log, errs
|
return log, errs
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue