mirror of
https://github.com/codingo/Interlace.git
synced 2026-02-22 15:24:31 +01:00
Fix the name of the exception when queue is empty.
This commit is contained in:
@@ -66,17 +66,17 @@ class Worker(object):
|
||||
self.tqdm = tqdm
|
||||
|
||||
def __call__(self):
|
||||
queue = self.queue
|
||||
while True:
|
||||
try:
|
||||
# get task from queue
|
||||
task = next(self.queue)
|
||||
task = next(queue)
|
||||
if isinstance(self.tqdm, tqdm):
|
||||
self.tqdm.update(1)
|
||||
# run task
|
||||
task.run(self.tqdm)
|
||||
else:
|
||||
task.run()
|
||||
except IndexError:
|
||||
except StopIteration:
|
||||
break
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user