From: Oto Šťáva Date: Mon, 21 Aug 2023 13:01:11 +0000 (+0200) Subject: manager: use self._type in KresID.__eq__() X-Git-Tag: v6.0.2~7^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=acf62261aca97f815a6e46d05593624a2b68a890;p=thirdparty%2Fknot-resolver.git manager: use self._type in KresID.__eq__() Fixes a case where a GC and KRESD KresID with the same `self._id` would be considered equal. Said behaviour breaks listing of all running subprocesses, where `kresd0` would be missing, because it has the same `self._id` as `cache-gc`. --- diff --git a/manager/knot_resolver_manager/kresd_controller/interface.py b/manager/knot_resolver_manager/kresd_controller/interface.py index c0d22a527..5a6ea5fe1 100644 --- a/manager/knot_resolver_manager/kresd_controller/interface.py +++ b/manager/knot_resolver_manager/kresd_controller/interface.py @@ -72,7 +72,7 @@ class KresID: def __eq__(self, o: object) -> bool: if isinstance(o, KresID): - return self._id == o._id + return self._type == o._type and self._id == o._id return False def __str__(self) -> str: