jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/361699 )
Change subject: [bugfix] Only force input_choise if self.always is given ......................................................................
[bugfix] Only force input_choise if self.always is given
- To force the default input choice, a default value must be given already. Otherwise a ValueError will be raised.
Bug: T161483 Change-Id: Iad3f8cb603807ee8e60e604662e419f2affdc3d6 --- M scripts/solve_disambiguation.py 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/solve_disambiguation.py b/scripts/solve_disambiguation.py index 618503c..7716173 100755 --- a/scripts/solve_disambiguation.py +++ b/scripts/solve_disambiguation.py @@ -71,7 +71,7 @@ # (C) Daniel Herding, 2004 # (C) Andre Engels, 2003-2004 # (C) WikiWichtel, 2004 -# (C) Pywikibot team, 2003-2016 +# (C) Pywikibot team, 2003-2017 # # Distributed under the terms of the MIT license. # @@ -837,7 +837,7 @@ # TODO: Output context on each question answer = pywikibot.input_choice('Option', options, default=self.always, - force=True) + force=bool(self.always)) if answer == 'x': assert edited, 'invalid option before editing' break
pywikibot-commits@lists.wikimedia.org