Page MenuHomePhabricator

error message in ui.input_list_choice() is never printed
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce:

input_list_choice('Frage?', ['foo', 'bar', None])
1: foo
2: bar
3: None
Frage?:
5

What happens?:
5 is an invalid response but the error message
pywikibot.error('Invalid response')
is not printed

What should have happened instead?:
Invalid response should be shown

The reason may be introduced with cached output functionaliy and the default output funtions are locked during input

Event Timeline

Xqt triaged this task as Medium priority.

Change 779470 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [bugfix] Use stream_output for messages inside input method

https://gerrit.wikimedia.org/r/779470

Change 779470 merged by jenkins-bot:

[pywikibot/core@master] [bugfix] Use stream_output for messages inside input method

https://gerrit.wikimedia.org/r/779470