summaryrefslogtreecommitdiff
path: root/buildstream/_yaml.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-06-19 17:54:43 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-06-19 18:03:56 +0900
commit2c79d0aa52e582a6553a2230407d1fde9f11ae4d (patch)
tree4a2f02dd47d09dbf9f7800d4daeca1c34a9ecad0 /buildstream/_yaml.py
parentc7a75c038b5b03c899a709bf9d106f2e217e9c71 (diff)
downloadbuildstream-2c79d0aa52e582a6553a2230407d1fde9f11ae4d.tar.gz
_yaml.py: Strengthen node_get() to handle TypeError in type conversions.
Diffstat (limited to 'buildstream/_yaml.py')
-rw-r--r--buildstream/_yaml.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/buildstream/_yaml.py b/buildstream/_yaml.py
index 94ce1c010..537f4cacd 100644
--- a/buildstream/_yaml.py
+++ b/buildstream/_yaml.py
@@ -363,7 +363,7 @@ def node_get(node, expected_type, key, indices=[], default_value=None):
value = expected_type(value)
else:
raise ValueError()
- except ValueError:
+ except (ValueError, TypeError):
provenance = node_get_provenance(node, key=key, indices=indices)
raise LoadError(LoadErrorReason.INVALID_DATA,
"%s: Value of '%s' is not of the expected type '%s'" %