diff options
Diffstat (limited to 'tosca2heat/tosca-parser')
-rw-r--r-- | tosca2heat/tosca-parser/toscaparser/elements/entity_type.py | 5 | ||||
-rw-r--r-- | tosca2heat/tosca-parser/toscaparser/tosca_template.py | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/elements/entity_type.py b/tosca2heat/tosca-parser/toscaparser/elements/entity_type.py index 5947b1c..9b9787b 100644 --- a/tosca2heat/tosca-parser/toscaparser/elements/entity_type.py +++ b/tosca2heat/tosca-parser/toscaparser/elements/entity_type.py @@ -108,8 +108,9 @@ class EntityType(object): if isinstance(value, list): for p_value in parent_value: if isinstance(p_value, dict): - if p_value.keys()[0] not in [ - item.keys()[0] for item in value]: + if list(p_value.keys())[0] not in [ + list(item.keys())[0] for item in + value]: value.append(p_value) else: if p_value not in value: diff --git a/tosca2heat/tosca-parser/toscaparser/tosca_template.py b/tosca2heat/tosca-parser/toscaparser/tosca_template.py index 01e6c73..8753a2c 100644 --- a/tosca2heat/tosca-parser/toscaparser/tosca_template.py +++ b/tosca2heat/tosca-parser/toscaparser/tosca_template.py @@ -210,7 +210,7 @@ class ToscaTemplate(object): def _handle_nested_topo_tpls(self, nested_topo_tpls): for tpl in nested_topo_tpls: - filename, tosca_tpl = tpl.items()[0] + filename, tosca_tpl = list(tpl.items())[0] if tosca_tpl.get(TOPOLOGY_TEMPLATE): nested_template = ToscaTemplate( path=filename, parsed_params=self.parsed_params, |