diff options
author | Benjamin Schubert <contact@benschubert.me> | 2019-06-11 07:55:21 +0100 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-07-15 14:14:02 +0000 |
commit | 4a56ebe6e589e2aa5d8da3fc2b76f76a19aa03b7 (patch) | |
tree | ffbdb49a64bd27f0ce0d9e421170a60f6db6706d /src/buildstream/plugins | |
parent | d14b809cc7b56b7be9e3e40c2e12e8f7245ba680 (diff) | |
download | buildstream-4a56ebe6e589e2aa5d8da3fc2b76f76a19aa03b7.tar.gz |
_yaml: Add 'as_int()' on ScalarNode
- Add the 'as_int()' method on 'ScalarNode' to replace
'node_get(mapping, key, int)'
- Adapt all call sites to use the new API
Diffstat (limited to 'src/buildstream/plugins')
-rw-r--r-- | src/buildstream/plugins/sources/patch.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buildstream/plugins/sources/patch.py b/src/buildstream/plugins/sources/patch.py index e42868264..01117db78 100644 --- a/src/buildstream/plugins/sources/patch.py +++ b/src/buildstream/plugins/sources/patch.py @@ -57,7 +57,7 @@ class PatchSource(Source): def configure(self, node): self.path = self.node_get_project_path(node, 'path', check_is_file=True) - self.strip_level = self.node_get_member(node, int, "strip-level", 1) + self.strip_level = node.get_int("strip-level", default=1) self.fullpath = os.path.join(self.get_project_directory(), self.path) def preflight(self): |