LazoCoder / Pokemon-Terminal

Pokemon terminal themes.
GNU General Public License v3.0
4.19k stars 224 forks source link

Fix issue #197: Ctrl+C interrupt no longer causes Traceback error when slideshow is cleared #212

Open CullenLYe opened 3 months ago

CullenLYe commented 3 months ago

In response to Issue#197: When a slideshow is running, if the user holds down Ctrl+C (Keyboard Interrupt) and then proceeds to clear the slideshow using the -c flag, a Traceback occurs and is printed to the Terminal: Screenshot 2024-04-03 105422

I added a try/except block to catch when a Keyboard Interrupt occurs. Now, if the user clears the slideshow, no Traceback is printed: Screenshot 2024-04-03 105751

sylveon commented 2 months ago

I'm not sure this fix gives the intended behavior here. I believe the user wants the slideshow to keep going, while this change will make it stop. A more ideal resolution is probably to somehow detach the worker process from the terminal so that it doesn't get input anymore.