jenkins-bot has submitted this change and it was merged.
Change subject: bot.py: fix deprecated inputChoice() and debug statement ......................................................................
bot.py: fix deprecated inputChoice() and debug statement
Replace deprecated inputChoice() with input_choice() in bot.userPut(). Renamed handleArgs to handle_args in pywikibot.debug().
Change-Id: I3d4ea64611b134fcbe4c68315a39aeb865acb044 --- M pywikibot/bot.py 1 file changed, 8 insertions(+), 5 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/bot.py b/pywikibot/bot.py index a0572aa..52a31c0 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -152,7 +152,7 @@ # levels to sys.stderr; levels WARNING and above are labeled with the # level name. # -# UserInterface objects must also define methods input(), inputChoice(), +# UserInterface objects must also define methods input(), input_choice(), # editText(), and askForCaptcha(), all of which are documented in # userinterfaces/terminal_interface.py
@@ -731,7 +731,7 @@ showHelp() sys.exit(0)
- pywikibot.debug(u"handleArgs() completed.", _logger) + pywikibot.debug(u"handle_args() completed.", _logger) return nonGlobalArgs
@@ -927,9 +927,12 @@ if self.getOption('always'): return True
- choice = pywikibot.inputChoice(question, - ['Yes', 'No', 'All', 'Quit'], - ['y', 'N', 'a', 'q'], 'N') + choice = pywikibot.input_choice(question, + [('Yes', 'y'), + ('No', 'N'), + ('All', 'a')], + default='N') + if choice == 'n': return False