Skip to contentSkip to conversation

knotty: Remove extra whitespace after task progress bars

PATCH New Peter Kjellerstedt 1 participant 1 message Mar 11, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 knotty: Remove extra whitespace after task progress bars

For some reason, BBProgress.setextra() always adds a space at the end. This prevents the task progress bars from filling the entire width of the terminal, making them stop one character short. This looks odd when shown together with the main progress bar, which does fill the entire terminal width.

---
 bitbake/lib/bb/ui/knotty.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
bitbake/lib/bb/ui/knotty.py +1 -3
index 521c262e45..82aa7c4644 100644
@@ -75,10 +75,8 @@ class BBProgress(progressbar.ProgressBar):
                 extrastr = str(extra)
                 if extrastr[0] != ' ':
                     extrastr = ' ' + extrastr
-                if extrastr[-1] != ' ':
-                    extrastr += ' '
             else:
-                extrastr = ' '
+                extrastr = ''
             self.widgets[self.extrapos] = extrastr
 
     def _need_update(self):
Signature · 1 line
2.12.0