diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-06-07 18:55:26 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-06-07 18:55:26 +0000 |
| commit | 7bf79a132b1826bc29b1c15ebfc7356c14f42515 (patch) | |
| tree | 763dbb8f5fee470c61893ddab19fc6c0a897c11a /nova/api | |
| parent | f088bdfd1cabcb5d03f473d20d7e76e3287acd9c (diff) | |
| parent | 3dce38f32559659978dd2ae69e9ffcb39c608582 (diff) | |
| download | nova-7bf79a132b1826bc29b1c15ebfc7356c14f42515.tar.gz nova-7bf79a132b1826bc29b1c15ebfc7356c14f42515.tar.xz nova-7bf79a132b1826bc29b1c15ebfc7356c14f42515.zip | |
Merge "Replace standard json module with openstack.common.jsonutils"
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/limits.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/api/openstack/compute/limits.py b/nova/api/openstack/compute/limits.py index 09dba0744..c0ef65670 100644 --- a/nova/api/openstack/compute/limits.py +++ b/nova/api/openstack/compute/limits.py @@ -20,7 +20,6 @@ Module dedicated functions/classes dealing with rate limiting requests. import collections import copy import httplib -import json import math import re import time @@ -32,6 +31,7 @@ from nova.api.openstack.compute.views import limits as limits_views from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova.openstack.common import importutils +from nova.openstack.common import jsonutils from nova import quota from nova import wsgi as base_wsgi @@ -418,7 +418,7 @@ class WsgiLimiter(object): raise webob.exc.HTTPMethodNotAllowed() try: - info = dict(json.loads(request.body)) + info = dict(jsonutils.loads(request.body)) except ValueError: raise webob.exc.HTTPBadRequest() @@ -449,7 +449,7 @@ class WsgiLimiterProxy(object): self.limiter_address = limiter_address def check_for_delay(self, verb, path, username=None): - body = json.dumps({"verb": verb, "path": path}) + body = jsonutils.dumps({"verb": verb, "path": path}) headers = {"Content-Type": "application/json"} conn = httplib.HTTPConnection(self.limiter_address) |
