diff --git a/lib/hypervisor/hv_kvm.py b/lib/hypervisor/hv_kvm.py index 6520132c1b76b9e0dc9dba1b5913738647d6354d..b273bb7242c322b58c472c6cd099611b298eae64 100644 --- a/lib/hypervisor/hv_kvm.py +++ b/lib/hypervisor/hv_kvm.py @@ -158,11 +158,7 @@ class QmpMessage: is not contained in the message """ - - if field_name in self.data: - return self.data[field_name] - - return None + return self.data.get(field_name, None) def __setitem__(self, field_name, field_value): """Set the value of the required field_name to field_value.