Skip to content

Commit 91b93b2

Browse files
committed
decode request response body in python3
1 parent b659429 commit 91b93b2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/vsc/utils/rest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ def request(self, method, url, body, headers, content_type=None):
179179
pybody = conn.headers
180180
else:
181181
body = conn.read()
182+
if is_py3():
183+
body = body.decode('utf-8') # byte encoded response
182184
try:
183185
pybody = json.loads(body)
184186
except ValueError:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
]
4545

4646
PACKAGE = {
47-
'version': '3.4.4',
47+
'version': '3.4.5',
4848
'author': [sdw, jt, ag, kh],
4949
'maintainer': [sdw, jt, ag, kh],
5050
# as long as 1.0.0 is not out, vsc-base should still provide vsc.fancylogger

0 commit comments

Comments
 (0)