diff options
Diffstat (limited to 'cloudinit/handlers/cloud_config.py')
-rw-r--r-- | cloudinit/handlers/cloud_config.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cloudinit/handlers/cloud_config.py b/cloudinit/handlers/cloud_config.py index 22ced20d..ba07b2ef 100644 --- a/cloudinit/handlers/cloud_config.py +++ b/cloudinit/handlers/cloud_config.py @@ -50,11 +50,13 @@ class CloudConfigPartHandler(handlers.Handler): util.write_file(self.cloud_fn, "\n".join(lines), 0600) def _merge_part(self, payload, headers, filename): - merge_how = headers.get("Merge-Type") + merge_headers_how = headers.get("Merge-Type") try: payload_y = util.load_yaml(payload) - if not merge_how: - merge_how = payload_y.pop("Merge-Type", '') + merge_how = '' + for merge_i in [payload_y.pop("Merge-Type", ''), merge_headers_how]: + if merge_i: + merge_how = merge_i merge_how = merge_how.strip().lower() if not merge_how: merge_how = DEF_MERGE_TYPE |