summaryrefslogtreecommitdiff
path: root/cloudinit/handlers
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-07-12 15:43:35 -0400
committerScott Moser <smoser@ubuntu.com>2012-07-12 15:43:35 -0400
commit265f2c74bb7202c2641b387b5a09c92bbe6563c8 (patch)
treec1805a6de271b95e3e76bb7f709aacba1f15c58c /cloudinit/handlers
parent5e296811619c7e814f61c8671cd596fe4203a38a (diff)
downloadvyos-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