summaryrefslogtreecommitdiff
path: root/heatclient/common/template_utils.py
diff options
context:
space:
mode:
authorPaul Van Eck <pvaneck@us.ibm.com>2014-02-05 12:56:15 -0800
committerPaul Van Eck <pvaneck@us.ibm.com>2014-02-05 13:03:49 -0800
commit24913c91b5f380ce525845dc58e6bfcde8c1780c (patch)
tree6a9e55aebbca9f9d8d21bb16cf436ac4878a1548 /heatclient/common/template_utils.py
parentbb754dc8f2af71b0c4f1d0853f18fd5428d1866e (diff)
downloadpython-heatclient-24913c91b5f380ce525845dc58e6bfcde8c1780c.tar.gz
Allow environment to not have resource_registry
If you try to use an environment file that contains only parameters, or even nothing, you get a NoneType error as the client is expecting there to be a value in the resource_registry section. This stops that error, thus allowing environment files to be empty or just contain parameters. Change-Id: I0c6c3bb60182915df346ebf8dd4e98ccc652ffb1 Closes-Bug: #1273881
Diffstat (limited to 'heatclient/common/template_utils.py')
-rw-r--r--heatclient/common/template_utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/heatclient/common/template_utils.py b/heatclient/common/template_utils.py
index cdc71cc..ccf5c37 100644
--- a/heatclient/common/template_utils.py
+++ b/heatclient/common/template_utils.py
@@ -136,6 +136,9 @@ def process_environment_and_files(env_path=None, template=None,
def resolve_environment_urls(resource_registry, files, env_base_url):
+ if resource_registry is None:
+ return
+
rr = resource_registry
base_url = rr.get('base_url', env_base_url)