diff options
Diffstat (limited to 'cloudinit/__init__.py')
-rw-r--r-- | cloudinit/__init__.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cloudinit/__init__.py b/cloudinit/__init__.py index 37447a31..3168a632 100644 --- a/cloudinit/__init__.py +++ b/cloudinit/__init__.py @@ -606,6 +606,14 @@ def partwalker_callback(pdata, ctype, filename, payload): partwalker_handle_handler(pdata, ctype, filename, payload) return if ctype not in pdata['handlers']: + 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] + if start < payload: + details = "starting '%s...'" % start.encode("string-escape") + else: + details = repr(payload) + log.warning("Unhandled non-multipart userdata %s", details) return handler_handle_part(pdata['handlers'][ctype], pdata['data'], ctype, filename, payload, pdata['frequency']) |