diff options
author | Ben Howard <ben.howard@canonical.com> | 2015-02-20 15:19:07 -0700 |
---|---|---|
committer | Ben Howard <ben.howard@canonical.com> | 2015-02-20 15:19:07 -0700 |
commit | 43a8d82141c5abcdf5ca546fd5a8ebc95cb3cbaf (patch) | |
tree | 9213a230c48f66ab3ca2a75ad6b6e0d13371c8ed /cloudinit/user_data.py | |
parent | 14d75254351009087efb5baa5cef808c5ef43e17 (diff) | |
download | vyos-cloud-init-43a8d82141c5abcdf5ca546fd5a8ebc95cb3cbaf.tar.gz vyos-cloud-init-43a8d82141c5abcdf5ca546fd5a8ebc95cb3cbaf.zip |
Fix for Py2 to Py3 difference: cloud-init user-data mime conversion fails on
base64 encoded data.
Diffstat (limited to 'cloudinit/user_data.py')
-rw-r--r-- | cloudinit/user_data.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/user_data.py b/cloudinit/user_data.py index fe343d0c..8fd7fba5 100644 --- a/cloudinit/user_data.py +++ b/cloudinit/user_data.py @@ -337,7 +337,7 @@ def convert_string(raw_data, headers=None): if not headers: headers = {} data = util.decomp_gzip(raw_data) - if "mime-version:" in data[0:4096].lower(): + if "mime-version:" in str(data[0:4096]).lower(): msg = email.message_from_string(data) for (key, val) in headers.items(): _replace_header(msg, key, val) |