| Message ID | e1f50c8c400f1691e514ee604fc33c5cda0df8fb.1770629479.git.yoann.congal@smile.fr |
|---|---|
| State | New |
| Headers | show |
| Series | [scarthgap,2.8,1/2] knotty: fix TIOCGWINSZ call for Python 3.14 and later | expand |
diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py index 3784c93ad..41a943adf 100644 --- a/lib/bb/ui/knotty.py +++ b/lib/bb/ui/knotty.py @@ -131,7 +131,7 @@ class TerminalFilter(object): def getTerminalColumns(self): def ioctl_GWINSZ(fd): try: - cr = struct.unpack('hh', fcntl.ioctl(fd, self.termios.TIOCGWINSZ, '1234')) + cr = struct.unpack('hhhh', fcntl.ioctl(fd, self.termios.TIOCGWINSZ, b'12345678'))[0:2] except: return None return cr