Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:13.2:Update
python3-Trolly
0001-Fix-JSON-decoding-under-Python-3.x.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Fix-JSON-decoding-under-Python-3.x.patch of Package python3-Trolly
From b2fff6d4528cbc8b918fc70090491e107176b987 Mon Sep 17 00:00:00 2001 From: Dirk Mueller <dirk@dmllr.de> Date: Tue, 25 Mar 2014 18:53:51 +0100 Subject: [PATCH] Fix JSON decoding under Python 3.x str(b'{}') returns "b'{}'", which is invalid JSON. As httplib2 under Python 2.x returns str already, we can just use content.decode() unconditionally and it should work with both Python 2.x and Python 3.x. --- trolly/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trolly/client.py b/trolly/client.py index 7cb94cf..f939292 100644 --- a/trolly/client.py +++ b/trolly/client.py @@ -103,7 +103,7 @@ class Client( object ): self.checkErrors( uri, response ) - return json.loads( str(content) ) + return json.loads( content.decode() ) def createOrganisation( self, organisation_json ): -- 1.9.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor