From 171e55533b12d694082d8d5d2fc5fff1cd9908f9 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 27 Oct 2024 02:53:23 +0100 Subject: Rename restore_term_settings() to restore_tcattrs() --- yahoozy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yahoozy.py b/yahoozy.py index c82a864..fedcd24 100755 --- a/yahoozy.py +++ b/yahoozy.py @@ -840,7 +840,7 @@ def checkbox(ckd: bool) -> str: return "[×]" if ckd else "[ ]" -def restore_term_settings(attrs: list) -> None: +def restore_tcattrs(attrs: list) -> None: """Restore terminal ATTRS on program exit.""" fd = sys.stdin.fileno() termios.tcsetattr(fd, termios.TCSANOW, attrs) @@ -859,6 +859,6 @@ if __name__ == "__main__": new_attrs[0] &= ~(termios.IXANY | termios.IXOFF | termios.IXON) termios.tcsetattr(fd, termios.TCSANOW, new_attrs) # Restore terminal settings on exit - atexit.register(restore_term_settings, old_attrs) + atexit.register(restore_tcattrs, old_attrs) curses.wrapper(main) -- cgit v1.2.3