From 33cfadd8f35b3f4beb77f871b4173600e42bbe49 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Sun, 26 Aug 2012 21:02:00 -0700 Subject: Ensure when an archive is exploded and if it contains the 'launch-index' key that we copy that key over to the right header (which will then be used later when assigning the 'real' header when the message is attached) --- cloudinit/user_data.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cloudinit/user_data.py b/cloudinit/user_data.py index d104d237..2b76482a 100644 --- a/cloudinit/user_data.py +++ b/cloudinit/user_data.py @@ -209,9 +209,11 @@ class UserDataProcessor(object): if 'filename' in ent: msg.add_header('Content-Disposition', 'attachment', filename=ent['filename']) + if 'launch-index' in ent: + msg.add_header('Launch-Index', str(ent['launch-index'])) for header in list(ent.keys()): - if header in ('content', 'filename', 'type'): + if header in ('content', 'filename', 'type', 'launch-index'): continue msg.add_header(header, ent['header']) -- cgit v1.2.3