diff options
author | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2018-10-24 11:09:22 +0100 |
---|---|---|
committer | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2018-10-25 15:43:52 +0100 |
commit | 5087f5c5c33ff83e15bb9e8340bb900d4d052115 (patch) | |
tree | ff2da25d1e5377a0a4ca4201ff5ae2abeb56d7c6 | |
parent | cd20e7a1c73a798f4af31ff716ee9a7bab708a4c (diff) | |
download | buildstream-5087f5c5c33ff83e15bb9e8340bb900d4d052115.tar.gz |
_artifactcache/cascache.py: Refactor slightly for indentation
Correct some multi-line conditional indentation by slight refactor
if necessary.
Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-rw-r--r-- | buildstream/_artifactcache/cascache.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/buildstream/_artifactcache/cascache.py b/buildstream/_artifactcache/cascache.py index 2454366ac..1a85e4c22 100644 --- a/buildstream/_artifactcache/cascache.py +++ b/buildstream/_artifactcache/cascache.py @@ -81,8 +81,9 @@ class CASCache(ArtifactCache): ################################################ def preflight(self): - if (not os.path.isdir(os.path.join(self.casdir, 'refs', 'heads')) or - not os.path.isdir(os.path.join(self.casdir, 'objects'))): + headdir = os.path.join(self.casdir, 'refs', 'heads') + objdir = os.path.join(self.casdir, 'objects') + if not (os.path.isdir(headdir) and os.path.isdir(objdir)): raise ArtifactError("CAS repository check failed for '{}'" .format(self.casdir)) @@ -918,7 +919,7 @@ class CASCache(ArtifactCache): # Skip download, already in local cache. pass elif (digest.size_bytes >= remote.max_batch_total_size_bytes or - not remote.batch_read_supported): + not remote.batch_read_supported): # Too large for batch request, download in independent request. self._ensure_blob(remote, digest) in_local_cache = True |