Repository :
http://git.fedorahosted.org/cgit/copr.git
On branch : master
---------------------------------------------------------------
commit 9c5aa4de043c667c4521b88d82c11f90c4589d96
Author: Miroslav Such�� <msuchy(a)redhat.com>
Date: Mon Feb 1 14:34:40 2016 +0100
convert bytes to utf-8 in Py3
---------------------------------------------------------------
.tito/build-missing-builds.sh | 1 +
python/copr/client_v2/net_client.py | 5 ++++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/.tito/build-missing-builds.sh b/.tito/build-missing-builds.sh
index f6a29b7..b88f5b5 100755
--- a/.tito/build-missing-builds.sh
+++ b/.tito/build-missing-builds.sh
@@ -11,6 +11,7 @@ fi
for package in $(cat .tito/packages/*| cut -d' ' -f2); do
pushd $package
tito release $PROJECT
+ popd
done
popd >/dev/null
diff --git a/python/copr/client_v2/net_client.py b/python/copr/client_v2/net_client.py
index 369b651..1a642fa 100644
--- a/python/copr/client_v2/net_client.py
+++ b/python/copr/client_v2/net_client.py
@@ -76,7 +76,10 @@ class ResponseWrapper(object):
"""
self.response = response
if response.status_code != 204 and response.content:
- self.json = json.loads(response.content)
+ if isinstance(response.content, bytes):
+ self.json = json.loads(response.content.decode('utf-8'))
+ else:
+ self.json = json.loads(response.content)
else:
self.json = None