Add better error handling for curses failures
This commit is contained in:
parent
db1464c2d2
commit
a07aa2685b
@ -346,4 +346,12 @@ train.append(pad_str)
|
||||
|
||||
if __name__ == "__main__":
|
||||
signal(SIGINT, handler)
|
||||
try:
|
||||
curses.wrapper(chuggachugga)
|
||||
except curses.error as err:
|
||||
print(
|
||||
f"{err}\n"
|
||||
"Couldn't print the train for some reason. "
|
||||
"Maybe your terminal window is too short?"
|
||||
)
|
||||
sys.exit(1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user