Skip to content

Commit

Permalink
convert http response to string while py3
Browse files Browse the repository at this point in the history
  • Loading branch information
hangzws committed Sep 16, 2018
1 parent e7bafe5 commit 4dad6d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions oss2/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from .utils import http_to_unixtime, make_progress_adapter, make_crc_adapter
from .exceptions import ClientError, InconsistentError
from .compat import urlunquote
from .compat import urlunquote, to_string
from .headers import *
import json

Expand Down Expand Up @@ -840,7 +840,7 @@ def __init__(self, resp):
self.fileSize = 0
self.object = ""
self.process_status = ""
result = json.loads(resp.read())
result = json.loads(to_string(resp.read()))
if 'bucket' in result:
self.bucket = result['bucket']
if 'fileSize' in result:
Expand Down

0 comments on commit 4dad6d5

Please sign in to comment.