diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2018-08-20 16:31:41 +0100 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2018-08-20 17:34:03 +0100 |
commit | f1a619b5b57c75afdddfbb3393d4f6cd18d3e20f (patch) | |
tree | c991c44797cb36311fae3f702177ba2e37e9f69b | |
parent | 92e34ccd2bfdb09f3c6d16e974d1c5fb78ac0516 (diff) | |
download | buildstream-f1a619b5b57c75afdddfbb3393d4f6cd18d3e20f.tar.gz |
CASCache: Fix cell-var-from-loop linting error
-rw-r--r-- | buildstream/_artifactcache/cascache.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/buildstream/_artifactcache/cascache.py b/buildstream/_artifactcache/cascache.py index d616e293a..6db10107e 100644 --- a/buildstream/_artifactcache/cascache.py +++ b/buildstream/_artifactcache/cascache.py @@ -318,7 +318,7 @@ class CASCache(ArtifactCache): resource_name = '/'.join(['uploads', str(uuid_), 'blobs', digest.hash, str(digest.size_bytes)]) - def request_stream(): + def request_stream(resname): with open(self.objpath(digest), 'rb') as f: assert os.fstat(f.fileno()).st_size == digest.size_bytes offset = 0 @@ -332,12 +332,12 @@ class CASCache(ArtifactCache): request.write_offset = offset # max. 64 kB chunks request.data = f.read(chunk_size) - request.resource_name = resource_name # pylint: disable=cell-var-from-loop + request.resource_name = resname request.finish_write = remaining <= 0 yield request offset += chunk_size finished = request.finish_write - response = remote.bytestream.Write(request_stream()) + response = remote.bytestream.Write(request_stream(resource_name)) request = buildstream_pb2.UpdateReferenceRequest() request.keys.append(ref) |