diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-06-28 13:10:56 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-06-28 13:10:56 -0400 |
commit | 646384ccd6f1707b2712d9bcd683ae877f1903bd (patch) | |
tree | 36feb8549341aa5a43af1ae3ed516f62b5987367 /cloudinit | |
parent | 74f09aacd76eb62dd18a265b097378b55ae0fb50 (diff) | |
download | vyos-cloud-init-646384ccd6f1707b2712d9bcd683ae877f1903bd.tar.gz vyos-cloud-init-646384ccd6f1707b2712d9bcd683ae877f1903bd.zip |
remove warning message to console on empty user-data
Previously, if the user did not provide any user-data, then
a warning would be emitted like:
2012-06-28 17:10:24,751 - __init__.py[WARNING]: Unhandled
non-multipart userdata ''
This just avoids the warning if there was no userdata.
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/__init__.py b/cloudinit/__init__.py index 6a1b46c5..dafb128a 100644 --- a/cloudinit/__init__.py +++ b/cloudinit/__init__.py @@ -607,7 +607,7 @@ def partwalker_callback(pdata, ctype, filename, payload): pdata['handlercount'] = 0 partwalker_handle_handler(pdata, ctype, filename, payload) return - if ctype not in pdata['handlers']: + if ctype not in pdata['handlers'] and payload: if ctype == "text/x-not-multipart": # Extract the first line or 24 bytes for displaying in the log start = payload.split("\n", 1)[0][:24] |