Skip to content

Commit 0ac7ee8

Browse files
committed
small update
1 parent 6b6a049 commit 0ac7ee8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

labelbox/data/generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ def __next__(self) -> Any:
8383

8484
if self.multithread:
8585
value = self.queue.get()
86-
if isinstance(value, Exception):
87-
raise value
8886

8987
while value is None:
9088
self.completed_threads += 1
@@ -94,6 +92,8 @@ def __next__(self) -> Any:
9492
thread.join()
9593
raise StopIteration
9694
value = self.queue.get()
95+
if isinstance(value, Exception):
96+
raise value
9797
else:
9898
value = self._process(next(self._data))
9999
return value

0 commit comments

Comments
 (0)