diff options
Diffstat (limited to 'bitbake/lib/bb/ui')
-rw-r--r-- | bitbake/lib/bb/ui/knotty.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 90c3183767..c3d73b9540 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py | |||
@@ -104,10 +104,11 @@ class InteractConsoleLogFilter(logging.Filter): | |||
104 | return True | 104 | return True |
105 | 105 | ||
106 | class TerminalFilter(object): | 106 | class TerminalFilter(object): |
107 | rows = 25 | ||
107 | columns = 80 | 108 | columns = 80 |
108 | 109 | ||
109 | def sigwinch_handle(self, signum, frame): | 110 | def sigwinch_handle(self, signum, frame): |
110 | self.columns = self.getTerminalColumns() | 111 | self.rows, self.columns = self.getTerminalColumns() |
111 | if self._sigwinch_default: | 112 | if self._sigwinch_default: |
112 | self._sigwinch_default(signum, frame) | 113 | self._sigwinch_default(signum, frame) |
113 | 114 | ||
@@ -131,7 +132,7 @@ class TerminalFilter(object): | |||
131 | cr = (env['LINES'], env['COLUMNS']) | 132 | cr = (env['LINES'], env['COLUMNS']) |
132 | except: | 133 | except: |
133 | cr = (25, 80) | 134 | cr = (25, 80) |
134 | return cr[1] | 135 | return cr |
135 | 136 | ||
136 | def __init__(self, main, helper, console, errconsole, format): | 137 | def __init__(self, main, helper, console, errconsole, format): |
137 | self.main = main | 138 | self.main = main |
@@ -207,7 +208,7 @@ class TerminalFilter(object): | |||
207 | content = "Currently %s running tasks (%s of %s):" % (len(activetasks), self.helper.tasknumber_current, self.helper.tasknumber_total) | 208 | content = "Currently %s running tasks (%s of %s):" % (len(activetasks), self.helper.tasknumber_current, self.helper.tasknumber_total) |
208 | print(content) | 209 | print(content) |
209 | lines = 1 + int(len(content) / (self.columns + 1)) | 210 | lines = 1 + int(len(content) / (self.columns + 1)) |
210 | for tasknum, task in enumerate(tasks): | 211 | for tasknum, task in enumerate(tasks[:(self.rows - 2)]): |
211 | content = "%s: %s" % (tasknum, task) | 212 | content = "%s: %s" % (tasknum, task) |
212 | print(content) | 213 | print(content) |
213 | lines = lines + 1 + int(len(content) / (self.columns + 1)) | 214 | lines = lines + 1 + int(len(content) / (self.columns + 1)) |