From 730302e250d8ebdd143c9188d353ea24669306ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Billeter?= Date: Mon, 13 Jan 2020 11:23:12 +0100 Subject: sandbox.py: Add combined_label() method to batch items This will be used to improve batch command logging with REAPI. --- src/buildstream/sandbox/sandbox.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/buildstream/sandbox') diff --git a/src/buildstream/sandbox/sandbox.py b/src/buildstream/sandbox/sandbox.py index f09aa03a0..e91e890bb 100644 --- a/src/buildstream/sandbox/sandbox.py +++ b/src/buildstream/sandbox/sandbox.py @@ -667,6 +667,9 @@ class _SandboxBatchItem: def __init__(self, *, label=None): self.label = label + def combined_label(self): + return self.label + # _SandboxBatchCommand() # @@ -704,6 +707,9 @@ class _SandboxBatchGroup(_SandboxBatchItem): for item in self.children: item.execute(batch) + def combined_label(self): + return "\n".join(item.combined_label() for item in self.children) + # _SandboxBatchCall() # -- cgit v1.2.1