File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 9
9
.. versionadded:: 3.0
10
10
"""
11
11
#
12
- # (C) Pywikibot team, 2017-2024
12
+ # (C) Pywikibot team, 2017-2025
13
13
#
14
14
# Distributed under the terms of the MIT license.
15
15
#
@@ -324,7 +324,6 @@ def generator(self):
324
324
"""
325
325
n = 0
326
326
event = None
327
- ignore_first_empty_warning = True
328
327
while self ._total is None or n < self ._total :
329
328
if not hasattr (self , 'source' ):
330
329
self .source = EventSource (** self .sse_kwargs )
@@ -355,10 +354,7 @@ def generator(self):
355
354
if self .streamfilter (element ):
356
355
n += 1
357
356
yield element
358
- elif not ignore_first_empty_warning :
359
- warning ('Empty message found.' )
360
- else :
361
- ignore_first_empty_warning = False
357
+ # else: ignore empty message
362
358
elif event .event == 'error' :
363
359
warning (f'Encountered error: { event .data } ' )
364
360
else :
You can’t perform that action at this time.
0 commit comments