From 72bd1519c96e4026d9903edab7c298caef3b05f3 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Fri, 3 Apr 2015 21:26:58 -0700 Subject: [PATCH] VMware: remove redundant check for block devices block_device_info_get_mapping will return [] or a list of block devices. There is no need to check the size of the array. Change-Id: Id07c9a79e5144f8199b4092febb0e1e5f41096d2 --- nova/virt/vmwareapi/vmops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/virt/vmwareapi/vmops.py b/nova/virt/vmwareapi/vmops.py index 4cfcdad24ff0..30f7a46ec7f3 100644 --- a/nova/virt/vmwareapi/vmops.py +++ b/nova/virt/vmwareapi/vmops.py @@ -637,7 +637,7 @@ class VMwareVMOps(object): else: self._use_disk_image_as_full_clone(vm_ref, vi) - if len(block_device_mapping) > 0: + if block_device_mapping: msg = "Block device information present: %s" % block_device_info # NOTE(mriedem): block_device_info can contain an auth_password # so we have to scrub the message before logging it.