[Notes] [Git][BuildStream/buildstream][bst-1.2] 2 commits: _artifactcache/cascache.py: Fix for PEP 479 / Python 3.7



Title: GitLab

Valentin David pushed to branch bst-1.2 at BuildStream / buildstream

Commits:

1 changed file:

Changes:

  • buildstream/_artifactcache/cascache.py
    ... ... @@ -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))



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]