summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/progress.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/bitbake/lib/bb/progress.py b/bitbake/lib/bb/progress.py
index b4e9bf0f29..8cddefaebe 100644
--- a/bitbake/lib/bb/progress.py
+++ b/bitbake/lib/bb/progress.py
@@ -204,6 +204,7 @@ class MultiStageProgressReporter:
204 value is considered to be out of stage_total, otherwise it should 204 value is considered to be out of stage_total, otherwise it should
205 be a percentage value from 0 to 100. 205 be a percentage value from 0 to 100.
206 """ 206 """
207 progress = None
207 if self._stage_total: 208 if self._stage_total:
208 stage_progress = (float(stage_progress) / self._stage_total) * 100 209 stage_progress = (float(stage_progress) / self._stage_total) * 100
209 if self._stage < 0: 210 if self._stage < 0:
@@ -212,9 +213,10 @@ class MultiStageProgressReporter:
212 progress = self._base_progress + (stage_progress * self._stage_weights[self._stage]) 213 progress = self._base_progress + (stage_progress * self._stage_weights[self._stage])
213 else: 214 else:
214 progress = self._base_progress 215 progress = self._base_progress
215 if progress > 100: 216 if progress:
216 progress = 100 217 if progress > 100:
217 self._fire_progress(progress) 218 progress = 100
219 self._fire_progress(progress)
218 220
219 def finish(self): 221 def finish(self):
220 if self._finished: 222 if self._finished: