summaryrefslogtreecommitdiff
path: root/src/buildstream/plugins/elements
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-07-16 18:31:19 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-07-17 08:26:26 +0000
commitb2a91466511f60e33e2e77fed2bf9c60bc31803d (patch)
treea34e90c980bf95d96c5db60a822e8954edf5c150 /src/buildstream/plugins/elements
parenta7ac4fed521881f54b76b199233c5aee3ba1f1ce (diff)
downloadbuildstream-b2a91466511f60e33e2e77fed2bf9c60bc31803d.tar.gz
node: Add 'get_str_list' on 'MappingNode'
`mapping.get_sequence(...).as_str_list()` is a very common pattern seen both in plugins and the core. Adding a helper to reduce the number of operations will make usage smoother
Diffstat (limited to 'src/buildstream/plugins/elements')
-rw-r--r--src/buildstream/plugins/elements/compose.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buildstream/plugins/elements/compose.py b/src/buildstream/plugins/elements/compose.py
index 83501d817..1c523eeb2 100644
--- a/src/buildstream/plugins/elements/compose.py
+++ b/src/buildstream/plugins/elements/compose.py
@@ -66,8 +66,8 @@ class ComposeElement(Element):
# We name this variable 'integration' only to avoid
# collision with the Element.integrate() method.
self.integration = node.get_bool('integrate')
- self.include = node.get_sequence('include').as_str_list()
- self.exclude = node.get_sequence('exclude').as_str_list()
+ self.include = node.get_str_list('include')
+ self.exclude = node.get_str_list('exclude')
self.include_orphans = node.get_bool('include-orphans')
def preflight(self):