0

quick and dirty fix for progressbar assertion error

This commit is contained in:
Aaron Griffith
2013-12-28 16:27:26 -05:00
parent da6d3614bc
commit 2584328ba3

View File

@@ -150,6 +150,9 @@ class ProgressBarObserver(progressbar.ProgressBar, Observer):
logging.info("Rendering complete!")
def update(self, current_value):
# maxval is an estimate, and progressbar barfs if currval > maxval
# so...
current_value = min(current_value, self.maxval)
if super(ProgressBarObserver, self).update(current_value):
self.last_update = self.get_current_value()