summaryrefslogtreecommitdiff
path: root/cloudinit/handlers
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2013-07-20 07:37:02 -0700
committerJoshua Harlow <harlowja@gmail.com>2013-07-20 07:37:02 -0700
commiteae3b6ad499b88b725a52cf07245e4721af380cf (patch)
tree7c1acdb8f133b40164553c155044e2a8322851a6 /cloudinit/handlers
parent0be217f4c177a34b5ec46aa3e64fb1bede4ceb33 (diff)
downloadcloud-init-git-eae3b6ad499b88b725a52cf07245e4721af380cf.tar.gz
Ensure we remove the same way we detect.
Diffstat (limited to 'cloudinit/handlers')
-rw-r--r--cloudinit/handlers/cloud_config.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/handlers/cloud_config.py b/cloudinit/handlers/cloud_config.py
index 654314c0..4dcdbe8b 100644
--- a/cloudinit/handlers/cloud_config.py
+++ b/cloudinit/handlers/cloud_config.py
@@ -114,7 +114,8 @@ class CloudConfigPartHandler(handlers.Handler):
return (payload_yaml, all_mergers)
def _merge_patch(self, payload):
- if payload.startswith("#json-patch"):
+ payload = payload.lstrip()
+ if payload.lower().startswith("#json-patch"):
# JSON doesn't handle comments in this manner, so ensure that
# if we started with this 'type' that we remove it before
# attempting to load it as json (which the jsonpatch library will