From 50b8a5ac70412b127489aa82a0c420688a55d8ad Mon Sep 17 00:00:00 2001 From: lucasheld Date: Sat, 25 Mar 2023 19:26:53 +0100 Subject: [PATCH] fix: dictionary changed size during iteration during deepcopy --- uptime_kuma_api/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uptime_kuma_api/api.py b/uptime_kuma_api/api.py index e13ac01..02181a6 100644 --- a/uptime_kuma_api/api.py +++ b/uptime_kuma_api/api.py @@ -475,7 +475,7 @@ class UptimeKumaApi(object): return [] time.sleep(0.01) time.sleep(0.05) # wait for multiple messages - return deepcopy(self._event_data[event]) + return deepcopy(self._event_data[event].copy()) def _call(self, event, data=None) -> Any: r = self.sio.call(event, data)