vm: fix error reporting on PVH without kernel set

Fixes QubesOS/qubes-issues#4254
This commit is contained in:
Marek Marczykowski-Górecki 2018-09-03 00:23:05 +02:00
parent 62ac42f06a
commit ee25f7c7bb
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -918,7 +918,7 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
qmemman_client = None
try:
if self.virt_mode == 'pvh' and self.kernel is None:
if self.virt_mode == 'pvh' and not self.kernel:
raise qubes.exc.QubesException(
'virt_mode PVH require kernel to be set')
yield from self.storage.verify()