tests: fix already registered event impl

This commit is contained in:
Frédéric Pierret (fepitre) 2020-03-16 18:34:11 +01:00
parent e6e4908e71
commit 40156c3e78
No known key found for this signature in database
GPG Key ID: 484010B5CDC576E2

View File

@ -99,9 +99,8 @@ except libvirt.libvirtError:
if in_dom0:
import libvirtaio
libvirt_event_impl = libvirtaio.virEventRegisterAsyncIOImpl()
else:
libvirt_event_impl = None
libvirt_event_impl = None
try:
in_git = subprocess.check_output(
@ -395,6 +394,10 @@ class QubesTestCase(unittest.TestCase):
self.loop = None
global libvirt_event_impl
if in_dom0 and not libvirt_event_impl:
libvirt_event_impl = libvirtaio.virEventRegisterAsyncIOImpl()
def __str__(self):
return '{}/{}/{}'.format(