code style fixes

This commit is contained in:
Marek Marczykowski-Górecki 2018-09-02 03:27:14 +02:00
parent e95ef5f61d
commit 57c9b2edf7
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -1254,13 +1254,17 @@ class Qubes(qubes.PropertyHolder):
elif event == libvirt.VIR_DOMAIN_EVENT_SUSPENDED:
try:
vm.fire_event('domain-paused')
except Exception: # pylint: disable=broad-except
self.log.exception('Uncaught exception from domain-paused handler for domain %s', vm.name)
except Exception: # pylint: disable=broad-except
self.log.exception(
'Uncaught exception from domain-paused handler '
'for domain %s', vm.name)
elif event == libvirt.VIR_DOMAIN_EVENT_RESUMED:
try:
vm.fire_event('domain-unpaused')
except Exception: # pylint: disable=broad-except
self.log.exception('Uncaught exception from domain-unpaused handler for domain %s', vm.name)
except Exception: # pylint: disable=broad-except
self.log.exception(
'Uncaught exception from domain-unpaused handler '
'for domain %s', vm.name)
@qubes.events.handler('domain-pre-delete')
def on_domain_pre_deleted(self, event, vm):