jenkins-bot submitted this change.
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(-)
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:
To view, visit change 1108398. To unsubscribe, or for help writing mail filters, visit settings.