summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-02-29 20:40:00 +0000
committerGerrit Code Review <review@openstack.org>2016-02-29 20:40:00 +0000
commit0eb686e5b3fc1f8a3d3c1041671be8b2e8dc5246 (patch)
tree3900f6306843dff76640fc3706ebc66c7196671b
parent5d98817c23a5bec6688ea9866ea079d6d7e31180 (diff)
parent9c56e52a26a52993110b0be80908df4899fdd737 (diff)
downloadpython-heatclient-0eb686e5b3fc1f8a3d3c1041671be8b2e8dc5246.tar.gz
Merge "Strip any whitespace before checking for json"
-rw-r--r--heatclient/common/template_format.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/heatclient/common/template_format.py b/heatclient/common/template_format.py
index 1636ebb..9ba4d64 100644
--- a/heatclient/common/template_format.py
+++ b/heatclient/common/template_format.py
@@ -45,6 +45,8 @@ def parse(tmpl_str):
This includes determination of whether the string is using the
JSON or YAML format.
"""
+ # strip any whitespace before the check
+ tmpl_str = tmpl_str.strip()
if tmpl_str.startswith('{'):
tpl = json.loads(tmpl_str)
else: