summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit')
-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