summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-03-12 13:40:49 +0000
committerJürg Billeter <j@bitron.ch>2019-03-25 10:24:41 +0100
commit34692a65b2657ec2ffcf721891498da31f65c2de (patch)
tree15c4854104842bec4fb4d0777fab0a095b02062c
parent559cd74867142dbf74e73bd9f30ccbb41021cde7 (diff)
downloadbuildstream-34692a65b2657ec2ffcf721891498da31f65c2de.tar.gz
_artifactcache.py: Add with_files parameter to contains_subdir_artifact
-rw-r--r--buildstream/_artifactcache.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/buildstream/_artifactcache.py b/buildstream/_artifactcache.py
index 964f50a0c..f97da4661 100644
--- a/buildstream/_artifactcache.py
+++ b/buildstream/_artifactcache.py
@@ -158,12 +158,13 @@ class ArtifactCache(BaseCache):
# element (Element): The Element to check
# key (str): The cache key to use
# subdir (str): The subdir to check
+ # with_files (bool): Whether to check files as well
#
# Returns: True if the subdir exists & is populated in the cache, False otherwise
#
- def contains_subdir_artifact(self, element, key, subdir):
+ def contains_subdir_artifact(self, element, key, subdir, *, with_files=True):
ref = element.get_artifact_name(key)
- return self.cas.contains_subdir_artifact(ref, subdir)
+ return self.cas.contains_subdir_artifact(ref, subdir, with_files=with_files)
# list_artifacts():
#