diff options
| author | Brian Lamar <brian.lamar@rackspace.com> | 2011-03-17 16:26:52 -0400 |
|---|---|---|
| committer | Brian Lamar <brian.lamar@rackspace.com> | 2011-03-17 16:26:52 -0400 |
| commit | 3628f50b4ecd2db0377fd9c158248d3b7e8e98ff (patch) | |
| tree | 71ef29c69e706c5947aeeb93f0e2cbde115e1540 /nova/api | |
| parent | f96dea3da633fc71f16de1bdb95e88249b316e29 (diff) | |
Better comment for fault. Improved readability of two small sections.
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/faults.py | 5 | ||||
| -rw-r--r-- | nova/api/openstack/limits.py | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/nova/api/openstack/faults.py b/nova/api/openstack/faults.py index ccccbd3d2..0e9c4b26f 100644 --- a/nova/api/openstack/faults.py +++ b/nova/api/openstack/faults.py @@ -91,7 +91,10 @@ class OverLimitFault(webob.exc.HTTPException): @webob.dec.wsgify(RequestClass=wsgi.Request) def __call__(self, request): - """Currently just return the wrapped exception.""" + """ + Return the wrapped exception with a serialized body conforming to our + error format. + """ serializer = wsgi.Serializer(self._serialization_metadata) content_type = request.best_match_content_type() content = serializer.serialize(self.content, content_type) diff --git a/nova/api/openstack/limits.py b/nova/api/openstack/limits.py index 1fe519f8a..efc7d193d 100644 --- a/nova/api/openstack/limits.py +++ b/nova/api/openstack/limits.py @@ -151,7 +151,7 @@ class Limit(object): water = self.water_level val = self.value - self.remaining = math.floor((cap - water) / cap * val) + self.remaining = math.floor(((cap - water) / cap) * val) self.next_request = now def _get_time(self): |
