![]() |
![]() |
|
![]() |
Fabian Neundorf | da6d47e Changeset → |
[FEAT] input_choice: Support exceptions as options Each option can now be an exception (subclassing ChoiceException) and it'll automatically raise it when selected. The QuitKeyboardInterrupt does subclass it and is already integrated into it. Moved the QuitKeyboardInterrupt into pywikibot.userinterfaces.terminal_interface_base and it is aliased in the pywikibot.bot module. This removes the ability to set the automatic_quit parameter to an int (pywikibot.bot doesn't even document this feature) as the option can be simply a ChoiceException or QuitKeyboardInterrupt. Change-Id: I2ebb7a2839577b721a8a73d772e48c5b2fcce486 |