[Python-modules-commits] [python-debiancontributors] 02/05: Deal with bytes as input in python3

Daniele Tricoli eriol-guest at moszumanska.debian.org
Tue Nov 15 00:19:26 UTC 2016


This is an automated email from the git hooks/post-receive script.

eriol-guest pushed a commit to branch master
in repository python-debiancontributors.

commit 9e0e16bfd12f25054f717db9221b137aa161b240
Author: Enrico Zini <enrico at enricozini.org>
Date:   Sat Jun 25 12:29:55 2016 +0200

    Deal with bytes as input in python3
---
 debiancontributors/parser.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debiancontributors/parser.py b/debiancontributors/parser.py
index 79bbbb5..b1090d6 100644
--- a/debiancontributors/parser.py
+++ b/debiancontributors/parser.py
@@ -152,7 +152,7 @@ def get_json(f, compression=None):
             raise Fail(500, "{} compression is not supported".format(compression))
     else:
         try:
-            return json.load(f)
+            return json.load(f.decode("utf-8"))
         except (ValueError, UnicodeDecodeError):
             raise Fail(400, "invalid JSON data")
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-debiancontributors.git



More information about the Python-modules-commits mailing list