This is needed to suppress the StopIteration exception
if i < position:
continue
position = yield
if i < position:
continue
position = yield
+ yield #suppress the StopIteration exception
class DiskDevice(object):
class DiskDevice(object):
if self.progress_bar is None:
self.progress_bar = progress_generator(total)
self.progress_bar.next()
if self.progress_bar is None:
self.progress_bar = progress_generator(total)
self.progress_bar.next()
- if position == 1:
- return
self.progress_bar.send(position)
self.progress_bar.send(position)