^C at invoke> cmd line exits gracefully

This commit is contained in:
Lincoln Stein 2022-10-17 23:14:32 -04:00
parent 9e599c65c5
commit 3b2590243c

View File

@ -95,7 +95,10 @@ def main():
"\n* Initialization done! Awaiting your command (-h for help, 'q' to quit)"
)
main_loop(gen, opt, infile)
try:
main_loop(gen, opt, infile)
except KeyboardInterrupt:
print("\ngoodbye!")
# TODO: main_loop() has gotten busy. Needs to be refactored.
def main_loop(gen, opt, infile):