CITGuru / PyInquirer

A Python module for common interactive command line user interfaces
MIT License
1.94k stars 236 forks source link

Improve handling of KeyboardInterrupt in prompt #38

Closed florimondmanca closed 5 years ago

florimondmanca commented 5 years ago

Hi, I'm proposing two changes in this PR:

  1. Do not print the keyboard interrupt message at all if it is empty
  2. Add option to re-raise keyboard interrupts (defaults to False to keep the current behavior).

2) is motivated by allowing to use PyInquirer in the context of a CLI which already listens to KeyboardInterrupt exceptions to cancel execution of the application.