mirror of
https://github.com/virt-manager/virt-manager.git
synced 2026-07-29 15:55:32 -05:00
virtinst: connection: Drop is_closed() helper
We have is_open, just use that Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
@@ -28,7 +28,6 @@ class TestConn(unittest.TestCase):
|
||||
assert not conn.get_uri_username()
|
||||
assert not conn.get_uri_transport()
|
||||
assert conn.close() == 0
|
||||
assert conn.is_closed()
|
||||
|
||||
# Coverage for a daemon_version check
|
||||
fakeuri = "__virtinst_test__test:///default,libver=123"
|
||||
|
||||
@@ -840,7 +840,7 @@ class vmmConnection(vmmGObject):
|
||||
self._closing = True
|
||||
|
||||
try:
|
||||
if not self._backend.is_closed():
|
||||
if self._backend.is_open():
|
||||
for eid in self._domain_cb_ids:
|
||||
self._backend.domainEventDeregisterAny(eid)
|
||||
for eid in self._network_cb_ids:
|
||||
|
||||
@@ -124,9 +124,6 @@ class VirtinstConnection(object):
|
||||
# Public API #
|
||||
##############
|
||||
|
||||
def is_closed(self):
|
||||
return not bool(self._libvirtconn)
|
||||
|
||||
def close(self):
|
||||
ret = 0
|
||||
if self._libvirtconn:
|
||||
|
||||
Reference in New Issue
Block a user