diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-07-12 15:43:35 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-07-12 15:43:35 -0400 |
commit | 265f2c74bb7202c2641b387b5a09c92bbe6563c8 (patch) | |
tree | c1805a6de271b95e3e76bb7f709aacba1f15c58c /cloudinit/handlers | |
parent | 5e296811619c7e814f61c8671cd596fe4203a38a (diff) | |
download | vyos-cloud-init-265f2c74bb7202c2641b387b5a09c92bbe6563c8.tar.gz vyos-cloud-init-265f2c74bb7202c2641b387b5a09c92bbe6563c8.zip |
load_yaml: if conversion fails, but string is empty, return default
the problem sovled here is that most callers of yaml_load do not pass
'None' as a allowed type. I didn't want to change all the callers.
If the yaml.safe_load ended up being None we were raising a TypeError
and that was getting logged (meaning output to console). Even though
the this was not really bad.
So, if the type is not in the list, *and* it is not empty, then log
exception. If it in the list and empty, just debug.
empty input was occurring when cloud-config was empty (no user-data)
Diffstat (limited to 'cloudinit/handlers')
0 files changed, 0 insertions, 0 deletions