summaryrefslogtreecommitdiff
path: root/buildstream/_artifact.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildstream/_artifact.py')
-rw-r--r--buildstream/_artifact.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/buildstream/_artifact.py b/buildstream/_artifact.py
index 64b470e53..40c14b1c5 100644
--- a/buildstream/_artifact.py
+++ b/buildstream/_artifact.py
@@ -48,7 +48,7 @@ from .storage._casbaseddirectory import CasBasedDirectory
#
class Artifact():
- def __init__(self, element, context, *, strong_key=None, weak_key):
+ def __init__(self, element, context, *, strong_key=None, weak_key=None):
self._element = element
self._context = context
self._artifacts = context.artifactcache
@@ -95,12 +95,7 @@ class Artifact():
# (str): The key
#
def get_extract_key(self):
-
- context = self._context
-
- key = self._cache_key if context.get_strict() else self._weak_cache_key
-
- return key
+ return self._cache_key or self._weak_cache_key
# cache():
#