aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-10-27 02:53:23 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-10-27 02:53:23 +0100
commit171e55533b12d694082d8d5d2fc5fff1cd9908f9 (patch)
treeb30c187a85023cadde59fbf9ad85c3e86dba1399
parent77aa0e766e85baaf8b2915675809c221f5f88a20 (diff)
Rename restore_term_settings() to restore_tcattrs()HEADmaster
-rwxr-xr-xyahoozy.py4
1 files 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)