diff options
author | James Ennis <james.ennis@codethink.com> | 2018-02-14 15:11:44 +0000 |
---|---|---|
committer | James Ennis <james.ennis@codethink.com> | 2018-03-14 14:10:26 +0000 |
commit | 1ba6167b8fc86964bfb0f12f266eb25b8233e194 (patch) | |
tree | 5ad44dcf0263367b991035a4167914c183a34eef /buildstream/_yaml.py | |
parent | a4a302bbf08415af34c804546f4e491e41dcee29 (diff) | |
download | buildstream-1ba6167b8fc86964bfb0f12f266eb25b8233e194.tar.gz |
pylint - dealt with dangerous-default-value warning
Diffstat (limited to 'buildstream/_yaml.py')
-rw-r--r-- | buildstream/_yaml.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/buildstream/_yaml.py b/buildstream/_yaml.py index 2e29f5e18..718f7321b 100644 --- a/buildstream/_yaml.py +++ b/buildstream/_yaml.py @@ -325,7 +325,7 @@ def node_get_provenance(node, key=None, indices=None): # Note: # Returned strings are stripped of leading and trailing whitespace # -def node_get(node, expected_type, key, indices=[], default_value=None): +def node_get(node, expected_type, key, indices=None, default_value=None): value = node.get(key, default_value) provenance = node_get_provenance(node) if value is None: @@ -333,7 +333,7 @@ def node_get(node, expected_type, key, indices=[], default_value=None): "{}: Dictionary did not contain expected key '{}'".format(provenance, key)) path = key - if indices: + if indices is not None: # Implied type check of the element itself value = node_get(node, list, key) for index in indices: |