summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser/toscaparser/tosca_template.py
diff options
context:
space:
mode:
authorshangxdy <shang.xiaodong@zte.com.cn>2016-07-31 01:32:11 +0800
committershangxdy <shang.xiaodong@zte.com.cn>2016-07-31 01:32:11 +0800
commit3d71f5fd990f264275fe13c66c41bc5ae4bb66e5 (patch)
treead3842e1b07549c83ae083612bb9da0114877736 /tosca2heat/tosca-parser/toscaparser/tosca_template.py
parented2f6006158e120159f4422bc626cc0d5fe5cecf (diff)
Doesn't support nested exceptioncollector when implement the nested
tosca template After the netsted tosca template is implemented, the ExceptionCollector doesn't work in netsted template, because the exceptions are reset by upper tosca template. The solution is judging if support nested node template before starting or stop exceptioncollector. Change-Id: Ic48bcb639031391a6771db2f7235b674b22be837 JIRA:PARSER-72 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/tosca_template.py')
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tosca_template.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/tosca_template.py b/tosca2heat/tosca-parser/toscaparser/tosca_template.py
index fa97572..058da15 100644
--- a/tosca2heat/tosca-parser/toscaparser/tosca_template.py
+++ b/tosca2heat/tosca-parser/toscaparser/tosca_template.py
@@ -65,7 +65,8 @@ class ToscaTemplate(object):
'''Load the template data.'''
def __init__(self, path=None, parsed_params=None, a_file=True,
yaml_dict_tpl=None, submaped_node_template=None):
- ExceptionCollector.start()
+ if submaped_node_template is None:
+ ExceptionCollector.start()
self.a_file = a_file
self.input_path = None
self.path = None
@@ -107,7 +108,8 @@ class ToscaTemplate(object):
self._handle_nested_topo_templates()
self.graph = ToscaGraph(self.nodetemplates)
- ExceptionCollector.stop()
+ if submaped_node_template is None:
+ ExceptionCollector.stop()
self.verify_template()
def _topology_template(self):