This patch allows cmd_info to work properly in case of getting any unicode chars in reply to bucket Policy/CORS requests.
Fixes at least #847
... | ... |
@@ -966,7 +966,7 @@ class S3(object): |
966 | 966 |
request = self.create_request("BUCKET_LIST", bucket = uri.bucket(), |
967 | 967 |
uri_params = {'policy': None}) |
968 | 968 |
response = self.send_request(request) |
969 |
- return response['data'] |
|
969 |
+ return decode_from_s3(response['data']) |
|
970 | 970 |
|
971 | 971 |
def set_policy(self, uri, policy): |
972 | 972 |
headers = SortedDict(ignore_case = True) |
... | ... |
@@ -989,7 +989,7 @@ class S3(object): |
989 | 989 |
request = self.create_request("BUCKET_LIST", bucket = uri.bucket(), |
990 | 990 |
uri_params = {'cors': None}) |
991 | 991 |
response = self.send_request(request) |
992 |
- return response['data'] |
|
992 |
+ return decode_from_s3(response['data']) |
|
993 | 993 |
|
994 | 994 |
def set_cors(self, uri, cors): |
995 | 995 |
headers = SortedDict(ignore_case = True) |