mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
connection: Fix deregisterevent tracebacks on app close
This commit is contained in:
parent
875e3cdc7b
commit
7aecd1a9b8
@ -924,7 +924,7 @@ class vmmConnection(vmmGObject):
|
||||
for dev in devs.values():
|
||||
dev.cleanup()
|
||||
|
||||
if self._backend:
|
||||
if not self._backend.is_closed():
|
||||
if self._domain_cb_id is None:
|
||||
self._backend.domainEventDeregisterAny(self._domain_cb_id)
|
||||
self._domain_cb_id = None
|
||||
|
@ -137,6 +137,9 @@ class VirtualConnection(object):
|
||||
# Public API #
|
||||
##############
|
||||
|
||||
def is_closed(self):
|
||||
return not bool(self._libvirtconn)
|
||||
|
||||
def close(self):
|
||||
self._libvirtconn = None
|
||||
self._uri = None
|
||||
|
Loading…
Reference in New Issue
Block a user