Valentin David pushed to branch bst-1.2 at BuildStream / buildstream
Commits:
-
002749b5
by Jürg Billeter at 2018-08-13T15:39:22Z
-
60df233d
by Valentin David at 2018-08-13T17:44:03Z
1 changed file:
Changes:
| ... | ... | @@ -845,6 +845,9 @@ class _CASRemote(): |
| 845 | 845 |
|
| 846 | 846 |
|
| 847 | 847 |
def _grouper(iterable, n):
|
| 848 |
- # pylint: disable=stop-iteration-return
|
|
| 849 | 848 |
while True:
|
| 850 |
- yield itertools.chain([next(iterable)], itertools.islice(iterable, n - 1))
|
|
| 849 |
+ try:
|
|
| 850 |
+ current = next(iterable)
|
|
| 851 |
+ except StopIteration:
|
|
| 852 |
+ return
|
|
| 853 |
+ yield itertools.chain([current], itertools.islice(iterable, n - 1))
|
