Skip to content

Commit

Permalink
fix(pikspect: set_terminal_geometry): skip os errors
Browse files Browse the repository at this point in the history
  • Loading branch information
actionless committed Sep 2, 2024
1 parent 982a3ad commit f792017
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pikaur/pikspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,12 @@ def get_terminal_geometry(rows: int = 80, columns: int = 80) -> os.terminal_size

def set_terminal_geometry(file_descriptor: int, rows: int, columns: int) -> None:
term_geometry_struct = struct.pack("HHHH", rows, columns, 0, 0)
fcntl.ioctl(
file_descriptor, termios.TIOCSWINSZ, term_geometry_struct,
)
try:
fcntl.ioctl(
file_descriptor, termios.TIOCSWINSZ, term_geometry_struct,
)
except OSError as exc:
logger.debug(exc)


class TTYInputWrapper: # pragma: no cover
Expand Down

0 comments on commit f792017

Please sign in to comment.