jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1108398?usp=email )
Change subject: tests: ignore empty message warning in eventstreams.py ......................................................................
tests: ignore empty message warning in eventstreams.py
Bug: T383035 Change-Id: I7fc393df0c868e533b0bf512ef6939b51a70269f --- M pywikibot/comms/eventstreams.py 1 file changed, 2 insertions(+), 6 deletions(-)
Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
diff --git a/pywikibot/comms/eventstreams.py b/pywikibot/comms/eventstreams.py index acddadc..8dd2daa 100644 --- a/pywikibot/comms/eventstreams.py +++ b/pywikibot/comms/eventstreams.py @@ -9,7 +9,7 @@ .. versionadded:: 3.0 """ # -# (C) Pywikibot team, 2017-2024 +# (C) Pywikibot team, 2017-2025 # # Distributed under the terms of the MIT license. # @@ -324,7 +324,6 @@ """ n = 0 event = None - ignore_first_empty_warning = True while self._total is None or n < self._total: if not hasattr(self, 'source'): self.source = EventSource(**self.sse_kwargs) @@ -355,10 +354,7 @@ if self.streamfilter(element): n += 1 yield element - elif not ignore_first_empty_warning: - warning('Empty message found.') - else: - ignore_first_empty_warning = False + # else: ignore empty message elif event.event == 'error': warning(f'Encountered error: {event.data}') else:
pywikibot-commits@lists.wikimedia.org