From 873c22d19a23f1cc51845c82eb9dfe8b4d60b2d6 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 16 Apr 2014 12:23:57 -0400 Subject: [PATCH] connection: Avoid some useless errors when connection closes - Run the connection - Restart libvirtd, connection is auto closed - Re-run the connection - Manually stop it, see errors in the logs about unknown event IDs We need to unconditionally clear our event ID list --- virtManager/connection.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/virtManager/connection.py b/virtManager/connection.py index 35c448462..0ae9d9483 100644 --- a/virtManager/connection.py +++ b/virtManager/connection.py @@ -973,14 +973,14 @@ class vmmConnection(vmmGObject): if not self._backend.is_closed(): for eid in self._domain_cb_ids: self._backend.domainEventDeregisterAny(eid) - self._domain_cb_ids = [] - for eid in self._network_cb_ids: self._backend.networkEventDeregisterAny(eid) - self._network_cb_ids = [] except: logging.debug("Failed to deregister events in conn cleanup", exc_info=True) + finally: + self._domain_cb_ids = [] + self._network_cb_ids = [] self._backend.close() self.record = []