diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2019-01-08 19:19:10 +0000 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2019-01-08 19:19:10 +0000 |
commit | edcc43ed34a81b3a3b4e105f35af03eb25115e1c (patch) | |
tree | e9100a3680600749f2445f9fdec9a0054ccb4ea9 | |
parent | 914ecb72a28844a9edb6cbfb328276e0225d430d (diff) | |
parent | 81f7a964946b6f6b082b697d6aefe9ff7cb811a5 (diff) | |
download | buildstream-edcc43ed34a81b3a3b4e105f35af03eb25115e1c.tar.gz |
Merge branch 'tristan/sandbox-programming-error' into 'master'
sandbox/sandbox.py: Use assertions for programming errors instead of BstErrors.
See merge request BuildStream/buildstream!1046
-rw-r--r-- | buildstream/sandbox/sandbox.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/buildstream/sandbox/sandbox.py b/buildstream/sandbox/sandbox.py index 617ebf5f5..4a1e81008 100644 --- a/buildstream/sandbox/sandbox.py +++ b/buildstream/sandbox/sandbox.py @@ -288,8 +288,8 @@ class Sandbox(): command = [command] if self.__batch: - if flags != self.__batch.flags: - raise SandboxError("Inconsistent sandbox flags in single command batch") + assert flags == self.__batch.flags, \ + "Inconsistent sandbox flags in single command batch" batch_command = _SandboxBatchCommand(command, cwd=cwd, env=env, label=label) @@ -326,8 +326,8 @@ class Sandbox(): if self.__batch: # Nested batch - if flags != self.__batch.flags: - raise SandboxError("Inconsistent sandbox flags in single command batch") + assert flags == self.__batch.flags, \ + "Inconsistent sandbox flags in single command batch" parent_group = self.__batch.current_group parent_group.append(group) |