My script using npyscreen breaks since the latest fedora release at with the followin error. I guess it's the python update, but it might be something else.
File "/usr/lib/python3.14/site-packages/npyscreen/proto_fm_screen_area.py", line 94, in _create_screen
self.lines = self._max_physical()[0]+1
~~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3.14/site-packages/npyscreen/proto_fm_screen_area.py", line 117, in _max_physical
mxy, mxx = struct.unpack('hh', fcntl.ioctl(sys.stderr.fileno(), termios.TIOCGWINSZ, 'xxxx'))
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: buffer overflow
I'd think a fix is as easy as changing these lines
|
mxy, mxx = struct.unpack('hh', fcntl.ioctl(sys.stderr.fileno(), termios.TIOCGWINSZ, 'xxxx')) |
|
if (mxy, mxx) == (0,0): |
to
mxy, mxx = termios.tcgetwinsize(sys.stderr.fileno())
if (mxy, mxx) == (0,0):
As this repo seems to be abandoned, I guess the creation of a PR is not worth the time, but maybe this helps someone else.
My script using npyscreen breaks since the latest fedora release at with the followin error. I guess it's the python update, but it might be something else.
I'd think a fix is as easy as changing these lines
npyscreen/npyscreen/proto_fm_screen_area.py
Lines 117 to 118 in 8ce3120
to
As this repo seems to be abandoned, I guess the creation of a PR is not worth the time, but maybe this helps someone else.