Revert "Merge remote-tracking branch 'exhuma/master', PR #963"
This reverts commite26727943f, reversing changes made to7bbb077704.
This commit is contained in:
@@ -20,8 +20,6 @@ import sys
|
||||
import os
|
||||
import json
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
class Observer(object):
|
||||
"""Base class that defines the observer interface.
|
||||
"""
|
||||
@@ -95,14 +93,14 @@ class LoggingObserver(Observer):
|
||||
self.last_update = -101
|
||||
|
||||
def finish(self):
|
||||
LOG.info("Rendered %d of %d. %d%% complete", self.get_max_value(),
|
||||
logging.info("Rendered %d of %d. %d%% complete", self.get_max_value(),
|
||||
self.get_max_value(), 100.0)
|
||||
super(LoggingObserver, self).finish()
|
||||
|
||||
def update(self, current_value):
|
||||
super(LoggingObserver, self).update(current_value)
|
||||
if self._need_update():
|
||||
LOG.info("Rendered %d of %d. %d%% complete",
|
||||
logging.info("Rendered %d of %d. %d%% complete",
|
||||
self.get_current_value(), self.get_max_value(),
|
||||
self.get_percentage())
|
||||
self.last_update = current_value
|
||||
@@ -139,7 +137,7 @@ class ProgressBarObserver(progressbar.ProgressBar, Observer):
|
||||
|
||||
def start(self, max_value):
|
||||
self._set_max_value(max_value)
|
||||
LOG.info("Rendering %d total tiles." % max_value)
|
||||
logging.info("Rendering %d total tiles." % max_value)
|
||||
super(ProgressBarObserver, self).start()
|
||||
|
||||
def is_started(self):
|
||||
@@ -149,7 +147,7 @@ class ProgressBarObserver(progressbar.ProgressBar, Observer):
|
||||
self._end_time = time.time()
|
||||
super(ProgressBarObserver, self).finish()
|
||||
self.fd.write('\n')
|
||||
LOG.info("Rendering complete!")
|
||||
logging.info("Rendering complete!")
|
||||
|
||||
def update(self, current_value):
|
||||
if super(ProgressBarObserver, self).update(current_value):
|
||||
|
||||
Reference in New Issue
Block a user