summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildstream/plugins/sources/_downloadablefilesource.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/buildstream/plugins/sources/_downloadablefilesource.py b/buildstream/plugins/sources/_downloadablefilesource.py
index 39bd48d25..d3b8d49bd 100644
--- a/buildstream/plugins/sources/_downloadablefilesource.py
+++ b/buildstream/plugins/sources/_downloadablefilesource.py
@@ -37,9 +37,16 @@ class DownloadableFileSource(Source):
return Consistency.RESOLVED
def get_ref(self):
+ # Report `None` value if we dont have a ref
+ if self.ref is None:
+ return None
return (self.ref, self.etag)
def set_ref(self, ref, node):
+ # Always support `None` value for ref
+ if ref is None:
+ ref = (None, None)
+
self.ref, self.etag = ref
node['ref'] = self.ref