jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/692710 )
Change subject: [cleanup] Remove toStdout parameter of ui.output() ......................................................................
[cleanup] Remove toStdout parameter of ui.output()
toStdout parameter was never used. The targetStream is passed via TerminalHandler
Change-Id: Iba42257962d94917a2df623449e2fcf256ecf7b0 --- M pywikibot/userinterfaces/terminal_interface_base.py 1 file changed, 4 insertions(+), 7 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/userinterfaces/terminal_interface_base.py b/pywikibot/userinterfaces/terminal_interface_base.py index 4b026b0..bdd2672 100755 --- a/pywikibot/userinterfaces/terminal_interface_base.py +++ b/pywikibot/userinterfaces/terminal_interface_base.py @@ -189,14 +189,14 @@ # set the new color, but only if they change self.encounter_color(color_stack[-1], target_stream)
- def output(self, text, toStdout=False, targetStream=None): + def output(self, text, targetStream=None): """Forward text to cache and flush if output is not locked.
All input methods locks the output to a stream but collect them in cache. They will be printed with next unlocked output call or at termination time. """ - self.cache_output(text, toStdout, targetStream) + self.cache_output(text, targetStream=targetStream) if not self.lock.locked(): self.flush()
@@ -213,7 +213,7 @@ """ self.cache.put_nowait((args, kwargs))
- def stream_output(self, text, toStdout=False, targetStream=None): + def stream_output(self, text, targetStream=None): """ Output text to a stream.
@@ -268,10 +268,7 @@ text = transliteratedText
if not targetStream: - if toStdout: - targetStream = self.stdout - else: - targetStream = self.stderr + targetStream = self.stderr
self._print(text, targetStream)