diff options
| author | Sandy Walsh <sandy.walsh@rackspace.com> | 2011-01-25 16:38:29 -0600 |
|---|---|---|
| committer | Sandy Walsh <sandy.walsh@rackspace.com> | 2011-01-25 16:38:29 -0600 |
| commit | 078914a7b6b517cb2929b5f3e27e5a327447e801 (patch) | |
| tree | e51042f5ed2380914190d0fdf3317199b54661db /nova/api | |
| parent | 0167151518dcfa714ecd8dab55f2378de5edf51f (diff) | |
| download | nova-078914a7b6b517cb2929b5f3e27e5a327447e801.tar.gz nova-078914a7b6b517cb2929b5f3e27e5a327447e801.tar.xz nova-078914a7b6b517cb2929b5f3e27e5a327447e801.zip | |
Fixed up a little image_id return
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/common.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/api/openstack/common.py b/nova/api/openstack/common.py index 01d620aed..6d2fa16e8 100644 --- a/nova/api/openstack/common.py +++ b/nova/api/openstack/common.py @@ -54,6 +54,7 @@ def get_image_id_from_image_hash(image_service, context, image_hash): except NotImplementedError: items = image_service.index(context) for image in items: - if abs(hash(image['id'])) == int(image_hash): + image_id = image['id'] + if abs(hash(image_id)) == int(image_hash): return image_id raise exception.NotFound(image_hash) |
