virt-manager/534eafe4-avoid-useless-errors-when-connection-closes.patch

35 lines
1.3 KiB
Diff
Raw Normal View History

Subject: connection: Avoid some useless errors when connection closes
From: Cole Robinson crobinso@redhat.com Wed Apr 16 12:23:57 2014 -0400
Date: Wed Apr 16 12:29:24 2014 -0400:
Git: 873c22d19a23f1cc51845c82eb9dfe8b4d60b2d6
- 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
Index: virt-manager-1.0.1/virtManager/connection.py
===================================================================
--- virt-manager-1.0.1.orig/virtManager/connection.py
+++ virt-manager-1.0.1/virtManager/connection.py
@@ -970,14 +970,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 = []