Skip to content

Commit 40512e3

Browse files
author
Frederick Ross
committed
Fix follow example.
It was still using the old ResultsReader interface.
1 parent c951ca1 commit 40512e3

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

examples/follow.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,8 @@ def follow(job, count, items):
4040
job.refresh()
4141
continue
4242
stream = items(offset+1)
43-
reader = results.ResultsReader(stream)
44-
while True:
45-
kind = reader.read()
46-
if kind == None: break
47-
if kind == results.RESULT:
48-
event = reader.value
49-
pprint(event)
43+
for event in results.ResultsReader(stream):
44+
pprint(event)
5045
offset = total
5146

5247
def main():

0 commit comments

Comments
 (0)