From b2ed1258c73055c2830c438ae1f3214e3c84ee3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavol=20=C5=BD=C3=A1=C4=8Dik?= Date: Fri, 19 Apr 2024 09:51:31 +0200 Subject: [PATCH] ppd: Fix hold releasing Do not iterate directly through the dictionary of holds, because it's being modified. Instead, iterate through the list of the dictionary keys. --- tuned/ppd/controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuned/ppd/controller.py b/tuned/ppd/controller.py index fdbfc4d..966da4c 100644 --- a/tuned/ppd/controller.py +++ b/tuned/ppd/controller.py @@ -88,7 +88,7 @@ class ProfileHoldManager(object): self._controller.switch_profile(new_profile) def clear(self): - for cookie in self._holds: + for cookie in list(self._holds.keys()): self._cancel(cookie)