Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Commit 7ebc913

Browse files
committed
fix TypeError for json.loads in Python 3
1 parent 9b3e633 commit 7ebc913

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ language: python
22

33
python:
44
- "2.7"
5+
- "3.4"
56

67
install:
78
- pip install coveralls

dj_elastictranscoder/views.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def endpoint(request):
1818
"""
1919

2020
try:
21-
data = json.loads(request.read())
21+
data = json.loads(request.read().decode('utf-8'))
2222
except ValueError:
2323
return HttpResponseBadRequest('Invalid JSON')
2424

0 commit comments

Comments
 (0)