We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 119088f commit 5117f83Copy full SHA for 5117f83
progressbar/progressbar.py
@@ -265,7 +265,6 @@ def __call__(self, iterable):
265
raise RuntimeError('Could not determine maxval from iterable. '
266
'You must explicitly provide a maxval.')
267
self._iterable = iter(iterable)
268
- self.start()
269
return self
270
271
def __iter__(self):
@@ -274,7 +273,10 @@ def __iter__(self):
274
273
def next(self):
275
try:
276
next = self._iterable.next()
277
- self.update(self.currval + 1)
+ if self.start_time is None:
+ self.start()
278
+ else:
279
+ self.update(self.currval + 1)
280
return next
281
except StopIteration:
282
self.finish()
0 commit comments