From bf4b47c94df8fda8f289681219674e345fdfa027 Mon Sep 17 00:00:00 2001 From: Leonardo Rochael Almeida Date: Wed, 3 Jun 2015 05:45:41 +0200 Subject: [PATCH] [IMP] JSONDecodeError > ValueError JSONDecodeError extends ValueError, and is not available in the Python Standard Library. --- openerp/http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openerp/http.py b/openerp/http.py index b3b243e4367..e5194b6d4cb 100644 --- a/openerp/http.py +++ b/openerp/http.py @@ -504,8 +504,8 @@ class JsonRequest(WebRequest): # Read POST content or POST Form Data named "request" try: - self.jsonrequest = simplejson.loads(request) - except simplejson.JSONDecodeError: + self.jsonrequest = json.loads(request) + except ValueError: msg = 'Invalid JSON data: %r' % (request,) _logger.info('%s: %s', self.httprequest.path, msg) raise werkzeug.exceptions.BadRequest(msg)