app: fix registering libvirt event handler

register_event_handlers is called early, when libvirt connection may not
be yet established - especially on empty qubes.xml. Do not skip
automatic connection logic.
This commit is contained in:
Marek Marczykowski-Górecki 2017-06-14 23:20:53 +02:00
parent e4d285d479
commit 083108e995
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -220,7 +220,7 @@ class VMMConnection(object):
events into qubes.events. This function should be called only in events into qubes.events. This function should be called only in
'qubesd' process and only when mainloop has been already set. 'qubesd' process and only when mainloop has been already set.
''' '''
self._libvirt_conn.domainEventRegisterAny( self.libvirt_conn.domainEventRegisterAny(
None, # any domain None, # any domain
libvirt.VIR_DOMAIN_EVENT_ID_LIFECYCLE, libvirt.VIR_DOMAIN_EVENT_ID_LIFECYCLE,
self._domain_event_callback, self._domain_event_callback,