summaryrefslogtreecommitdiff
path: root/src/buildstream/_gitsourcebase.py
diff options
context:
space:
mode:
authorBenjamin Schubert <contact@benschubert.me>2019-06-09 14:22:35 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-07-15 14:14:02 +0000
commitfcef3658433f74a2f396ed353bb3534f0001f3d8 (patch)
treea3c74347254332f06583fbdc1c6a6fc4411d21aa /src/buildstream/_gitsourcebase.py
parentf6616bc9d51a791aba1e177c61e27f768bebd9cb (diff)
downloadbuildstream-fcef3658433f74a2f396ed353bb3534f0001f3d8.tar.gz
_yaml: add 'get_mapping()' to MappingNode
This allows to get a mapping node from another 'MappingNode', replacing 'node_get(my_mapping, key, type=dict)' Also changes all places where 'node_get' was called like that by the new API.
Diffstat (limited to 'src/buildstream/_gitsourcebase.py')
-rw-r--r--src/buildstream/_gitsourcebase.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buildstream/_gitsourcebase.py b/src/buildstream/_gitsourcebase.py
index 1f539d820..8c6b54e2d 100644
--- a/src/buildstream/_gitsourcebase.py
+++ b/src/buildstream/_gitsourcebase.py
@@ -412,9 +412,9 @@ class _GitSourceBase(Source):
# and submodule_checkout_overrides dictionaries.
self.submodule_overrides = {}
self.submodule_checkout_overrides = {}
- modules = self.node_get_member(node, dict, 'submodules', {})
+ modules = node.get_mapping('submodules', {})
for path, _ in self.node_items(modules):
- submodule = self.node_get_member(modules, dict, path)
+ submodule = modules.get_mapping(path)
url = self.node_get_member(submodule, str, 'url', None)
# Make sure to mark all URLs that are specified in the configuration