diff options
author | Angelos Evripiotis <jevripiotis@bloomberg.net> | 2019-06-11 10:12:14 +0100 |
---|---|---|
committer | Angelos Evripiotis <jevripiotis@bloomberg.net> | 2019-06-27 10:19:49 +0100 |
commit | dd707c074c69697893122155691aa0e06a05901c (patch) | |
tree | 59a8f851ffaeadc92b5385613736e43b14ebba50 | |
parent | cd2185cc8d458d1a2d409ca2c3fcc3af973c72e1 (diff) | |
download | buildstream-aevri/cascache_nits.tar.gz |
cascache: add_object, assert path if link_directlyaevri/cascache_nits
-rw-r--r-- | src/buildstream/_cas/cascache.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/buildstream/_cas/cascache.py b/src/buildstream/_cas/cascache.py index ba520851c..53f6029db 100644 --- a/src/buildstream/_cas/cascache.py +++ b/src/buildstream/_cas/cascache.py @@ -367,6 +367,9 @@ class CASCache(): # Exactly one of the two parameters has to be specified assert (path is None) != (buffer is None) + # If we're linking directly, then path must be specified. + assert (not link_directly) or (link_directly and path) + if digest is None: digest = remote_execution_pb2.Digest() |