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

openSUSE Build Service is sponsored by