diff options
author | Martin Packman <martin.packman@canonical.com> | 2012-03-12 13:56:40 +0000 |
---|---|---|
committer | Martin Packman <martin.packman@canonical.com> | 2012-03-12 13:56:40 +0000 |
commit | c1a006bb9ee915c08075e9adeab245f02452ee43 (patch) | |
tree | 414ec6af086d9d39cebf4177ed14c10837d5b3c6 /cloudinit/UserDataHandler.py | |
parent | de316086b3915ddfc242a5cc25324f3181148a49 (diff) | |
download | vyos-cloud-init-c1a006bb9ee915c08075e9adeab245f02452ee43.tar.gz vyos-cloud-init-c1a006bb9ee915c08075e9adeab245f02452ee43.zip |
Restrict warning to userdata without MIME wrapping only while still ignoring most types
Diffstat (limited to 'cloudinit/UserDataHandler.py')
-rw-r--r-- | cloudinit/UserDataHandler.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/UserDataHandler.py b/cloudinit/UserDataHandler.py index 98729056..ec914480 100644 --- a/cloudinit/UserDataHandler.py +++ b/cloudinit/UserDataHandler.py @@ -180,7 +180,7 @@ def process_includes(msg, appendmsg=None): payload = part.get_payload(decode=True) - if ctype_orig == "text/plain": + if ctype_orig in ("text/plain", "text/x-not-multipart"): ctype = type_from_startswith(payload) if ctype is None: @@ -213,7 +213,7 @@ def message_from_string(data, headers=None): else: msg[key] = val else: - mtype = headers.get("Content-Type", "text/plain") + mtype = headers.get("Content-Type", "text/x-not-multipart") maintype, subtype = mtype.split("/", 1) msg = MIMEBase(maintype, subtype, *headers) msg.set_payload(data) |