diff options
author | Ewan Mellor <ewan.mellor@citrix.com> | 2010-07-26 08:27:27 +0000 |
---|---|---|
committer | Tarmac <> | 2010-07-26 08:27:27 +0000 |
commit | 17096b0eef78680164746303d65f9f9a50a91562 (patch) | |
tree | fc00515aaf4fa8b68f2854d39b337cd4bf21fc0d /nova/objectstore | |
parent | b6f604ccccd86d2c6d4ba99bae09159f18afe631 (diff) | |
parent | 0278767e0dc41444b889f904e6e49d26be5a54c4 (diff) | |
download | nova-17096b0eef78680164746303d65f9f9a50a91562.tar.gz |
Fix references to image_object. This caused an internal error when using
euca-deregister.
Diffstat (limited to 'nova/objectstore')
-rw-r--r-- | nova/objectstore/handler.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nova/objectstore/handler.py b/nova/objectstore/handler.py index c670ee02f4..ae3ffa0ebf 100644 --- a/nova/objectstore/handler.py +++ b/nova/objectstore/handler.py @@ -273,12 +273,12 @@ class ImageResource(Resource): def render_POST(self, request): """ update image attributes: public/private """ - image_id = self.get_argument('image_id', u'') - operation = self.get_argument('operation', u'') + image_id = get_argument(request, 'image_id', u'') + operation = get_argument(request, 'operation', u'') image_object = image.Image(image_id) - if not image.is_authorized(request.context): + if not image_object.is_authorized(request.context): raise exception.NotAuthorized image_object.set_public(operation=='add') @@ -287,10 +287,10 @@ class ImageResource(Resource): def render_DELETE(self, request): """ delete a registered image """ - image_id = self.get_argument("image_id", u"") + image_id = get_argument(request, "image_id", u"") image_object = image.Image(image_id) - if not image.is_authorized(request.context): + if not image_object.is_authorized(request.context): raise exception.NotAuthorized image_object.delete() |