Commit 81e265f5 authored by Guido Trotter's avatar Guido Trotter
Browse files

kvm: Move parameter validation before use

We had parameter validation when the runtime is generated, but in the
middle of the function. Move up, before any parameter is accessed.
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarThomas Thrainer <>
parent 99c7cd5b
......@@ -1019,6 +1019,7 @@ class KVMHypervisor(hv_base.BaseHypervisor):
# pylint: disable=R0912,R0914,R0915
hvp = instance.hvparams
pidfile = self._InstancePidFile(
kvm = hvp[constants.HV_KVM_PATH]
......@@ -1060,8 +1061,6 @@ class KVMHypervisor(hv_base.BaseHypervisor):
boot_floppy = hvp[constants.HV_BOOT_ORDER] == constants.HT_BO_FLOPPY
boot_network = hvp[constants.HV_BOOT_ORDER] == constants.HT_BO_NETWORK
if startup_paused:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment