Skip to content

Commit

Permalink
Merge "Add 'bytes' to image size rejection message"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Aug 29, 2012
2 parents 24c0728 + c068c7f commit 4c038b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions glance/api/v1/images.py
Expand Up @@ -448,7 +448,7 @@ def _upload(self, req, image_meta):
content_type='text/plain')

except exception.ImageSizeLimitExceeded, e:
msg = _("Denying attempt to upload image larger than %d.")
msg = _("Denying attempt to upload image larger than %d bytes.")
self._safe_kill(req, image_id)
raise HTTPBadRequest(explanation=msg % CONF.image_size_cap,
request=req, content_type='text/plain')
Expand Down Expand Up @@ -849,7 +849,7 @@ def _deserialize(self, request):

elif image_size > CONF.image_size_cap:
max_image_size = CONF.image_size_cap
msg = _("Denying attempt to upload image larger than %d.")
msg = _("Denying attempt to upload image larger than %d bytes.")
LOG.warn(msg % max_image_size)
raise HTTPBadRequest(explanation=msg % max_image_size,
request=request)
Expand Down

0 comments on commit 4c038b0

Please sign in to comment.