summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildstream/sandbox/sandbox.py8
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)