summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-03-13 10:51:57 +0000
committerJürg Billeter <j@bitron.ch>2019-03-14 11:28:37 +0000
commit4b2c66bac96df34568a82e26b96e1801449b836c (patch)
tree88379cdf5950ce22479156a8319574cb33be2117
parentf8c60c6c9951003b306975874891e29253055c0c (diff)
downloadbuildstream-4b2c66bac96df34568a82e26b96e1801449b836c.tar.gz
_casbaseddirectory.py: Use variable-length argument list for _objpath()
This matches Directory.descend().
-rw-r--r--buildstream/_artifact.py12
-rw-r--r--buildstream/storage/_casbaseddirectory.py2
2 files changed, 7 insertions, 7 deletions
diff --git a/buildstream/_artifact.py b/buildstream/_artifact.py
index 45ea53408..0c1e71194 100644
--- a/buildstream/_artifact.py
+++ b/buildstream/_artifact.py
@@ -241,7 +241,7 @@ class Artifact():
# Load the public data from the artifact
artifact_vdir, _ = self._get_directory()
- meta_file = artifact_vdir._objpath(['meta', 'public.yaml'])
+ meta_file = artifact_vdir._objpath('meta', 'public.yaml')
data = _yaml.load(meta_file, shortname='meta/public.yaml')
return data
@@ -263,7 +263,7 @@ class Artifact():
assert key is not None
artifact_vdir, _ = self._get_directory(key)
- meta_file = artifact_vdir._objpath(['meta', 'build-result.yaml'])
+ meta_file = artifact_vdir._objpath('meta', 'build-result.yaml')
if not os.path.exists(meta_file):
build_result = (True, "succeeded", None)
return build_result
@@ -298,7 +298,7 @@ class Artifact():
metadata_keys[key]['weak'], None)
# Parse the expensive yaml now and cache the result
- meta_file = artifact_vdir._objpath(['meta', 'keys.yaml'])
+ meta_file = artifact_vdir._objpath('meta', 'keys.yaml')
meta = _yaml.load(meta_file, shortname='meta/keys.yaml')
strong_key = meta['strong']
weak_key = meta['weak']
@@ -336,7 +336,7 @@ class Artifact():
return (metadata_dependencies[key], None, None)
# Parse the expensive yaml now and cache the result
- meta_file = artifact_vdir._objpath(['meta', 'dependencies.yaml'])
+ meta_file = artifact_vdir._objpath('meta', 'dependencies.yaml')
meta = _yaml.load(meta_file, shortname='meta/dependencies.yaml')
# Cache it under both strong and weak keys
@@ -373,7 +373,7 @@ class Artifact():
return (metadata_workspaced[key], None, None)
# Parse the expensive yaml now and cache the result
- meta_file = artifact_vdir._objpath(['meta', 'workspaced.yaml'])
+ meta_file = artifact_vdir._objpath('meta', 'workspaced.yaml')
meta = _yaml.load(meta_file, shortname='meta/workspaced.yaml')
workspaced = meta['workspaced']
@@ -412,7 +412,7 @@ class Artifact():
return (metadata_workspaced_dependencies[key], None, None)
# Parse the expensive yaml now and cache the result
- meta_file = artifact_vdir._objpath(['meta', 'workspaced-dependencies.yaml'])
+ meta_file = artifact_vdir._objpath('meta', 'workspaced-dependencies.yaml')
meta = _yaml.load(meta_file, shortname='meta/workspaced-dependencies.yaml')
workspaced = meta['workspaced-dependencies']
diff --git a/buildstream/storage/_casbaseddirectory.py b/buildstream/storage/_casbaseddirectory.py
index 91e11888d..f977fbf77 100644
--- a/buildstream/storage/_casbaseddirectory.py
+++ b/buildstream/storage/_casbaseddirectory.py
@@ -577,7 +577,7 @@ class CasBasedDirectory(Directory):
return self.__digest
- def _objpath(self, path):
+ def _objpath(self, *path):
subdir = self.descend(*path[:-1])
entry = subdir.index[path[-1]]
return self.cas_cache.objpath(entry.digest)