tinfoil: Only allow one process progress bar at once (continued)
PATCH 1/1 tinfoil: Only allow one process progress bar at once (continued)
In commit fcf6effe8c6de015e0ec65f908b606af6d096c23, the handling of process progress bars was changed so that only one can be active at once. However, for tinfoil it was only half done as apparently virtually the same code exists in two places and only the first was updated. This corrects the second occurence.
Signed-off-by Peter Kjellerstedt <[email protected]>
--- lib/bb/tinfoil.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
lib/bb/tinfoil.py +5 -5
@@ -927,23 +927,23 @@ class Tinfoil: if isinstance(event, bb.event.ProcessStarted): if self.quiet > 1: continue + if parseprogress: + parseprogress.finish() parseprogress = bb.ui.knotty.new_progress(event.processname, event.total) parseprogress.start(False) continue if isinstance(event, bb.event.ProcessProgress): if self.quiet > 1: continue - if parseprogress: + if parseprogress and parseprogress.id == event.processname: parseprogress.update(event.progress) - else: - bb.warn("Got ProcessProgress event for something that never started?") continue if isinstance(event, bb.event.ProcessFinished): if self.quiet > 1: continue - if parseprogress: + if parseprogress and parseprogress.id == event.processname: parseprogress.finish() - parseprogress = None + parseprogress = None continue if isinstance(event, bb.command.CommandCompleted): result = True