From a0ef5ad84f1ce3502e17215ef49c83d2738d2a84 Mon Sep 17 00:00:00 2001 From: Yun Mao Date: Mon, 13 Aug 2012 11:53:53 -0400 Subject: Fix type error in state comparison vm_states.RESIZED is not a list/tuple, use == to compare instead of in (although it did work by accident in Python). Change-Id: Ib739e729ae79a3f68ca0eac10167982bd3a6656c --- nova/virt/libvirt/imagecache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova') diff --git a/nova/virt/libvirt/imagecache.py b/nova/virt/libvirt/imagecache.py index fe96f1aec..ba350749a 100644 --- a/nova/virt/libvirt/imagecache.py +++ b/nova/virt/libvirt/imagecache.py @@ -142,7 +142,7 @@ class ImageCacheManager(object): task_states.RESIZE_MIGRATED, task_states.RESIZE_FINISH] if instance['task_state'] in resize_states or \ - instance['vm_state'] in vm_states.RESIZED: + instance['vm_state'] == vm_states.RESIZED: self.instance_names.add(instance['name'] + '_resize') image_ref_str = str(instance['image_ref']) -- cgit