diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-06-19 17:54:43 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-06-19 18:03:56 +0900 |
commit | 2c79d0aa52e582a6553a2230407d1fde9f11ae4d (patch) | |
tree | 4a2f02dd47d09dbf9f7800d4daeca1c34a9ecad0 /buildstream/_yaml.py | |
parent | c7a75c038b5b03c899a709bf9d106f2e217e9c71 (diff) | |
download | buildstream-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.py | 2 |
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'" % |