diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-03-29 17:03:41 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-03-29 17:03:41 +0000 |
| commit | 484f0a42be3c36aaf508264e1109e0c9b1abc07e (patch) | |
| tree | b7c858ed9d89f989e3c6cc2609900f3fb1a57d69 | |
| parent | 431f13c4f3457f04224e5d0095d91772750dffc1 (diff) | |
| parent | 38bc2d329581bf85d131e0025a13c7e87ea9f107 (diff) | |
Merge "Base image signature files are not images."
| -rw-r--r-- | nova/tests/test_imagecache.py | 1 | ||||
| -rw-r--r-- | nova/virt/libvirt/imagecache.py | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/nova/tests/test_imagecache.py b/nova/tests/test_imagecache.py index 09f5f9fce..373f8478b 100644 --- a/nova/tests/test_imagecache.py +++ b/nova/tests/test_imagecache.py @@ -77,6 +77,7 @@ class ImageCacheManagerTestCase(test.TestCase): 'e97222e91fc4241f49a7f520d1dcf446751129b3', '17d1b00b81642842e514494a78e804e9a511637c', '17d1b00b81642842e514494a78e804e9a511637c_5368709120', + '17d1b00b81642842e514494a78e804e9a511637c_5368709120.sha1', '17d1b00b81642842e514494a78e804e9a511637c_10737418240', '00000004'] diff --git a/nova/virt/libvirt/imagecache.py b/nova/virt/libvirt/imagecache.py index 07bab5cd3..092ab1d05 100644 --- a/nova/virt/libvirt/imagecache.py +++ b/nova/virt/libvirt/imagecache.py @@ -134,7 +134,9 @@ class ImageCacheManager(object): if len(ent) == digest_size: self._store_image(base_dir, ent, original=True) - elif len(ent) > digest_size + 2 and ent[digest_size] == '_': + elif (len(ent) > digest_size + 2 and + ent[digest_size] == '_' and + not ent.endswith('.sha1')): self._store_image(base_dir, ent, original=False) def _list_running_instances(self, context): |
