mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 19:48:23 +00:00
Fix dictionary changed size during iteration in prometheus (#115005)
Fixes #104803
This commit is contained in:
parent
b29eb317bd
commit
90bc21b7f6
@ -258,7 +258,7 @@ class PrometheusMetrics:
|
||||
self, entity_id: str, friendly_name: str | None = None
|
||||
) -> None:
|
||||
"""Remove labelsets matching the given entity id from all metrics."""
|
||||
for metric in self._metrics.values():
|
||||
for metric in list(self._metrics.values()):
|
||||
for sample in cast(list[prometheus_client.Metric], metric.collect())[
|
||||
0
|
||||
].samples:
|
||||
|
Loading…
x
Reference in New Issue
Block a user