python3.6 expects 'encoding' as keyword argument.

this works for python2 also

Change-Id: Iee4b268ca35f562778c347c1c67896cfcf19ee42
This commit is contained in:
Sumit Jamgade 2018-09-11 18:11:41 +02:00
parent 32ac17c844
commit 2b45672471
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ class BaseResource(object):
raise freezer_api_exc.BadDataFormat('Empty request body. A valid '
'JSON document is required.')
try:
json_data = json.loads(raw_json, 'utf-8')
json_data = json.loads(raw_json, encoding='utf-8')
except ValueError:
raise falcon.HTTPError(falcon.HTTP_753,
'Malformed JSON')