Skip to contentSkip to conversation

bitbake: ui/knotty: allow rate for indeterminate progress

PATCH New Chris Laplante 1 participant 1 message Mar 10, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake: ui/knotty: allow rate for indeterminate progress

There is no reason not to allow showing a rate for indeterminate task progress. It can be useful, e.g. when downloading from a server that doesn't give the total download size.

---
 lib/bb/ui/knotty.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/ui/knotty.py +1 -1
index fa88e6c..f4ef19d 100644
@@ -293,8 +293,8 @@ class TerminalFilter(object):
                         if start_time:
                             pbar.start_time = start_time
                     pbar.setmessage('%s:%s' % (tasknum, pbar.msg.split(':', 1)[1]))
+                    pbar.setextra(rate)
                     if progress > -1:
-                        pbar.setextra(rate)
                         content = pbar.update(progress)
                     else:
                         content = pbar.update(1)
Signature · 1 line
2.7.4