diff options
author | shangxdy <shang.xiaodong@zte.com.cn> | 2016-07-10 01:09:02 +0800 |
---|---|---|
committer | shangxdy <shang.xiaodong@zte.com.cn> | 2016-07-10 01:20:58 +0800 |
commit | d9da67e738e90d2842421fe0d5e20311ff18fe70 (patch) | |
tree | 100406505d0d4ef3698eab2172c09f24df0cd25d /tosca2heat/tosca-parser/toscaparser/properties.py | |
parent | 0997552722dc4845a854e0e6f8d7f18058e26380 (diff) |
Fix bug in python3.4: 'dict_keys' object does not support indexing
In python3.4, dictory's function of key() return value is a dict_key object, not list, so the follow code will be error:
dict x = {1:11, 2:22, 3;33}
y= x.keys()[0]
the error is TypeError: 'dict_keys' object does not support indexing, the correct expression is below:
y = list(x.keys())[0]
So parser's code will be modified refer to above.
Change-Id: I41e0c28167c7823fc735aaf3afc78c1a9a15e9e0
JIRA: PARSER-64
Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/properties.py')
0 files changed, 0 insertions, 0 deletions