Escape newlines and " in metadata script.

Change-Id: If0c8667042fe9f630ac04f1ca5c7f390fdcbc94a
Reviewed-on: https://review.openstack.org/34058
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
This commit is contained in:
Monty Taylor 2013-06-21 18:54:46 -04:00 committed by Jenkins
parent fa7d1e5e68
commit 358da22571

View File

@ -48,6 +48,8 @@ for key, value in meta_items.items():
if not isinstance(value, list):
value = [value]
for v in value:
v = v.replace('\n', r'\n')
v = v.replace('"', r'\"')
curl_config.write('form = "%s=%s"\n' % (key, v))
curl_config.write('\n')