Skip to content

Commit

Permalink
Merge pull request s3tools#1021 from offshore/patch-1
Browse files Browse the repository at this point in the history
Return decoded response in get_policy and get_cors
  • Loading branch information
fviard authored Mar 4, 2019
2 parents 222af5d + 3048fdc commit bed381f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions S3/S3.py
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ def get_policy(self, uri):
request = self.create_request("BUCKET_LIST", bucket = uri.bucket(),
uri_params = {'policy': None})
response = self.send_request(request)
return response['data']
return decode_from_s3(response['data'])

def set_policy(self, uri, policy):
headers = SortedDict(ignore_case = True)
Expand All @@ -989,7 +989,7 @@ def get_cors(self, uri):
request = self.create_request("BUCKET_LIST", bucket = uri.bucket(),
uri_params = {'cors': None})
response = self.send_request(request)
return response['data']
return decode_from_s3(response['data'])

def set_cors(self, uri, cors):
headers = SortedDict(ignore_case = True)
Expand Down

0 comments on commit bed381f

Please sign in to comment.