Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

IS-1021: DictDB iteration causes infinite loop #420

Merged

Conversation

cow-hs
Copy link
Contributor

@cow-hs cow-hs commented Mar 2, 2020

officially we do not support iteration on DictDB
so add raise Exception code

references
https://www.python.org/dev/peps/pep-0234/
https://docs.python.org/3/reference/datamodel.html#object.__getitem__

@cow-hs cow-hs self-assigned this Mar 2, 2020
iconservice/iconscore/icon_container_db.py Outdated Show resolved Hide resolved
pass


class TestContainerDB(unittest.TestCase):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of tests? Please let me know.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test created a situation where iterable with getitem and it could take an infinite loop.

add comment, append detail log message
@goldworm-icon goldworm-icon merged commit 728fb20 into release-1.6.1 Mar 6, 2020
@goldworm-icon goldworm-icon deleted the IS-1021-dict-db-iteration-causes-infinite-loop branch March 6, 2020 07:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants