Skip to content

Commit 007ac8e

Browse files
committed
Prevents the dictionary increased in size during iteration
1 parent cdfff1b commit 007ac8e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

inelsmqtt/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ def __on_message(
576576

577577
if device_type == "gw" and message_type == "connected":
578578
mac = message_parts[2]
579-
for stripped_topic in self.__listeners:
579+
for stripped_topic in list(self.__listeners):
580580
if stripped_topic.startswith(mac):
581581
self.__notify_listeners(stripped_topic, True)
582582
return

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
setup(
66
name="elkoep-mqtt",
7-
version="0.2.33.beta.13",
7+
version="0.2.33.beta.14",
88
url="https://github.com/epdevlab/elkoep-mqtt",
99
license="MIT",
1010
author="Elko EP s.r.o.",

0 commit comments

Comments
 (0)