Skip to content

Commit

Permalink
[F] Fix #298?
Browse files Browse the repository at this point in the history
  • Loading branch information
hykilpikonna committed Oct 7, 2024
1 parent c1fbd13 commit 6ac7f70
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hyfetch/termenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,11 @@ def handler(signum, frame):
# Terminate with sequence terminator [\ or bell ^G
if code.endswith('\x1b\\') or code.endswith('\a'):
break
signal.alarm(0)
except IOError:
pass
finally:
# Disable alarm
signal.alarm(0)

# Reset terminal back to normal mode (previously set to raw mode)
termios.tcsetattr(fd, termios.TCSADRAIN, settings)
Expand Down

0 comments on commit 6ac7f70

Please sign in to comment.