mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-21 01:23:09 +02:00
...
This commit is contained in:
parent
c2d78fefc0
commit
2b14b4f21b
1 changed files with 4 additions and 3 deletions
|
|
@ -170,12 +170,13 @@ def start(self, id_map):
|
|||
self.failures = []
|
||||
self.ids = []
|
||||
self.canceled = False
|
||||
self.finalized = False
|
||||
self.pb.setMinimum(0)
|
||||
self.pb.setMaximum(len(id_map))
|
||||
self.timer.start(50)
|
||||
|
||||
def do_one(self):
|
||||
if self.canceled:
|
||||
if self.canceled or self.finalized:
|
||||
return
|
||||
if self.current_idx >= len(self.id_map):
|
||||
self.finalize()
|
||||
|
|
@ -210,10 +211,10 @@ def reject(self):
|
|||
def finalize(self):
|
||||
self.timer.stop()
|
||||
|
||||
if self.canceled:
|
||||
if self.canceled or self.finalized:
|
||||
return
|
||||
# Prevent queued timer events from having any effect
|
||||
self.canceled = True
|
||||
self.finalized = True
|
||||
|
||||
if self.failures:
|
||||
msg = []
|
||||
|
|
|
|||
Loading…
Reference in a new issue