Commit 52979a6
authored
Fix Prediction.output_iterator (#106)
The `output` variable is shadowed by the yielding loop, so when we hit
the line:
previous_output = output
the value of `output` refers to the last value of `output` from the loop
above, not the total output we received. That causes the client to
shrink the output down to a single string (which, inconveniently, also
is a valid argument to `len()`), which means we take the wrong slice of
the output the next time through the loop.
Signed-off-by: Dominic Baggott <dominic.baggott@gmail.com>1 parent a7c7c5d commit 52979a6
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
0 commit comments