diff options
| author | Zoltan Boszormenyi <zboszor@gmail.com> | 2025-11-05 11:59:36 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2026-02-16 09:52:34 +0000 |
| commit | be8cc4137c8ca9be65ac77217a890674126675eb (patch) | |
| tree | ff0bc3ff6fa37961522c30b851c72f1024a1902e /bitbake | |
| parent | c0ba29bb80de74b1de480c87f991097058efbfe6 (diff) | |
| download | poky-be8cc4137c8ca9be65ac77217a890674126675eb.tar.gz | |
bitbake: knotty: Make sure getTerminalColumns() returns two integers
Python 3.14 complains about these:
Traceback (most recent call last):
File "/mnt2/zozo/yocto-5.3/bitbake/lib/bb/ui/knotty.py", line 722, in main
termfilter.updateFooter()
~~~~~~~~~~~~~~~~~~~~~~~^^
File "/mnt2/zozo/yocto-5.3/bitbake/lib/bb/ui/knotty.py", line 339, in updateFooter
lines = self.getlines(content)
File "/mnt2/zozo/yocto-5.3/bitbake/lib/bb/ui/knotty.py", line 370, in getlines
lines = lines + 1 + int(len(line) / (self.columns + 1))
~~~~~~~~~~~~~^~~
TypeError: can only concatenate str (not "int") to str
and
Traceback (most recent call last):
File "/mnt2/zozo/yocto-5.3/bitbake/lib/bb/ui/knotty.py", line 722, in main
termfilter.updateFooter()
~~~~~~~~~~~~~~~~~~~~~~~^^
File "/mnt2/zozo/yocto-5.3/bitbake/lib/bb/ui/knotty.py", line 341, in updateFooter
for tasknum, task in enumerate(tasks[:(self.rows - 1 - lines)]):
~~~~~~~~~~^~~
TypeError: unsupported operand type(s) for -: 'str' and 'int'
Make sure getting the number of rows and columns from the terminal
via the environment variables LINES and COLUMNS are returned as a
pair of integers. This matches the return value of ioctl_GWINSZ().
(Bitbake rev: 10118785e4a670bce4980e1044c0888a8b6e84af)
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a4e0b6f8077276a0bfb9d05c759bc752a84d1f76)
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Paul Barker <paul@pbarker.dev>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
| -rw-r--r-- | bitbake/lib/bb/ui/knotty.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 41a943adf8..5198e93d8d 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py | |||
| @@ -145,7 +145,7 @@ class TerminalFilter(object): | |||
| 145 | pass | 145 | pass |
| 146 | if not cr: | 146 | if not cr: |
| 147 | try: | 147 | try: |
| 148 | cr = (os.environ['LINES'], os.environ['COLUMNS']) | 148 | cr = (int(os.environ['LINES']), int(os.environ['COLUMNS'])) |
| 149 | except: | 149 | except: |
| 150 | cr = (25, 80) | 150 | cr = (25, 80) |
| 151 | return cr | 151 | return cr |
