diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-08-26 21:02:00 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-08-26 21:02:00 -0700 |
commit | 33cfadd8f35b3f4beb77f871b4173600e42bbe49 (patch) | |
tree | 01d052fd08f4070b71929b09a4ab1a78f649bcd2 /cloudinit/user_data.py | |
parent | 7994ac0b1924cf0cc3e3e99ea6f11842f56bc4c8 (diff) | |
download | vyos-cloud-init-33cfadd8f35b3f4beb77f871b4173600e42bbe49.tar.gz vyos-cloud-init-33cfadd8f35b3f4beb77f871b4173600e42bbe49.zip |
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)
Diffstat (limited to 'cloudinit/user_data.py')
-rw-r--r-- | cloudinit/user_data.py | 4 |
1 files changed, 3 insertions, 1 deletions
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']) |