Skip to content

实际系统中存在slots只有单个字典的情况#2

Open
gwyxjtu wants to merge 2 commits into
IUpdatable:masterfrom
gwyxjtu:master
Open

实际系统中存在slots只有单个字典的情况#2
gwyxjtu wants to merge 2 commits into
IUpdatable:masterfrom
gwyxjtu:master

Conversation

@gwyxjtu

@gwyxjtu gwyxjtu commented Aug 1, 2023

Copy link
Copy Markdown

如果slots只有一个字典,会存在
File "/***/site-packages/oBIX/common/util.py", line 81, in parse_point
name = slot["@name"]
TypeError: string indices must be integers

提前判断是否只有单个slot,套一层list可以解决问题

gwyxjtu added 2 commits August 1, 2023 15:00
Avoid situations where slots has only one dictionary
Update util.py, avoid situations where slots has only one dictionary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant