[Notes] [Git][BuildStream/buildstream][valentindavid/python3.7-1.2] 3 commits: Fix crash when --debug is passed



Title: GitLab

Valentin David pushed to branch valentindavid/python3.7-1.2 at BuildStream / buildstream

Commits:

2 changed files:

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))

  • buildstream/element.py
    ... ... @@ -194,6 +194,9 @@ class Element(Plugin):
    194 194
     
    
    195 195
         def __init__(self, context, project, artifacts, meta, plugin_conf):
    
    196 196
     
    
    197
    +        self.__cache_key_dict = None            # Dict for cache key calculation
    
    198
    +        self.__cache_key = None                 # Our cached cache key
    
    199
    +
    
    197 200
             super().__init__(meta.name, context, project, meta.provenance, "element")
    
    198 201
     
    
    199 202
             self.__is_junction = meta.kind == "junction"
    
    ... ... @@ -212,8 +215,6 @@ class Element(Plugin):
    212 215
             self.__runtime_dependencies = []        # Direct runtime dependency Elements
    
    213 216
             self.__build_dependencies = []          # Direct build dependency Elements
    
    214 217
             self.__sources = []                     # List of Sources
    
    215
    -        self.__cache_key_dict = None            # Dict for cache key calculation
    
    216
    -        self.__cache_key = None                 # Our cached cache key
    
    217 218
             self.__weak_cache_key = None            # Our cached weak cache key
    
    218 219
             self.__strict_cache_key = None          # Our cached cache key for strict builds
    
    219 220
             self.__artifacts = artifacts            # Artifact cache
    



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