diff options
| author | Yun Mao <yunmao@gmail.com> | 2012-08-13 11:53:53 -0400 |
|---|---|---|
| committer | Yun Mao <yunmao@gmail.com> | 2012-08-13 11:53:53 -0400 |
| commit | a0ef5ad84f1ce3502e17215ef49c83d2738d2a84 (patch) | |
| tree | e0abc2cd8775d4a7ee1e3b24c5f4e554b6e9aa54 | |
| parent | 2db23f6ba4db8fe95d05874dc3c6bef017a412ae (diff) | |
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
| -rw-r--r-- | nova/virt/libvirt/imagecache.py | 2 |
1 files changed, 1 insertions, 1 deletions
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']) |
