summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin David <valentin.david@gmail.com>2018-08-13 17:44:03 +0000
committerValentin David <valentin.david@gmail.com>2018-08-13 17:44:03 +0000
commit60df233d629782b6ce47cb51b46ae0187adb5e72 (patch)
treec20eb2005a19339458246e51f0af593637a0d07d
parent6a2f3b59b0ec99a89e46e6dd12f13ef4de0d8a88 (diff)
parent002749b598954e8426f4477789f4c9e5d020961d (diff)
downloadbuildstream-60df233d629782b6ce47cb51b46ae0187adb5e72.tar.gz
Merge branch 'valentindavid/python3.7-1.2' into 'bst-1.2'
Python 3.7 support See merge request BuildStream/buildstream!649
-rw-r--r--buildstream/_artifactcache/cascache.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/buildstream/_artifactcache/cascache.py b/buildstream/_artifactcache/cascache.py
index 74422241c..4fea98626 100644
--- a/buildstream/_artifactcache/cascache.py
+++ b/buildstream/_artifactcache/cascache.py
@@ -845,6 +845,9 @@ class _CASRemote():
def _grouper(iterable, n):
- # pylint: disable=stop-iteration-return
while True:
- yield itertools.chain([next(iterable)], itertools.islice(iterable, n - 1))
+ try:
+ current = next(iterable)
+ except StopIteration:
+ return
+ yield itertools.chain([current], itertools.islice(iterable, n - 1))