Skip to content

Commit cd1681d

Browse files
committed
fix json parsing in python3 < 3.6
1 parent 7dd6bcc commit cd1681d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

linstor/linstorapi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,8 @@ def parse_volume_size_to_kib(cls, size_str):
280280
def _decode_response_data(cls, response):
281281
data = response.read()
282282
if response.getheader("Content-Encoding", "text") == "gzip":
283-
return zlib.decompress(data, zlib.MAX_WBITS | 16)
284-
return data
283+
return zlib.decompress(data, zlib.MAX_WBITS | 16).decode()
284+
return data.decode()
285285

286286
def _require_version(self, required_version, msg="REST action not supported by server"):
287287
"""

0 commit comments

Comments
 (0)