| ... | ... |
@@ -844,7 +844,8 @@ class S3(object): |
| 844 | 844 |
## Set kms headers |
| 845 | 845 |
if self.config.kms_key: |
| 846 | 846 |
headers['x-amz-server-side-encryption'] = 'aws:kms' |
| 847 |
- headers['x-amz-server-side-encryption-aws-kms-key-id'] = self.config.kms_key |
|
| 847 |
+ headers['x-amz-server-side-encryption-aws-kms-key-id'] = \ |
|
| 848 |
+ self.config.kms_key |
|
| 848 | 849 |
|
| 849 | 850 |
if extra_headers: |
| 850 | 851 |
headers.update(extra_headers) |
| ... | ... |
@@ -874,7 +875,8 @@ class S3(object): |
| 874 | 874 |
#http://doc.s3.amazonaws.com/proposals/copy.html |
| 875 | 875 |
# Error during copy, status will be 200, so force error code 500 |
| 876 | 876 |
response["status"] = 500 |
| 877 |
- error("Server error during the COPY operation. Overwrite response status to 500")
|
|
| 877 |
+ error("Server error during the COPY operation. Overwrite response "
|
|
| 878 |
+ "status to 500") |
|
| 878 | 879 |
raise S3Error(response) |
| 879 | 880 |
|
| 880 | 881 |
if self.config.acl_public is None and acl: |
| ... | ... |
@@ -923,7 +925,8 @@ class S3(object): |
| 923 | 923 |
## Set kms headers |
| 924 | 924 |
if self.config.kms_key: |
| 925 | 925 |
headers['x-amz-server-side-encryption'] = 'aws:kms' |
| 926 |
- headers['x-amz-server-side-encryption-aws-kms-key-id'] = self.config.kms_key |
|
| 926 |
+ headers['x-amz-server-side-encryption-aws-kms-key-id'] = \ |
|
| 927 |
+ self.config.kms_key |
|
| 927 | 928 |
|
| 928 | 929 |
if extra_headers: |
| 929 | 930 |
headers.update(extra_headers) |
| ... | ... |
@@ -931,13 +934,15 @@ class S3(object): |
| 931 | 931 |
if self.config.mime_type: |
| 932 | 932 |
headers["content-type"] = self.config.mime_type |
| 933 | 933 |
|
| 934 |
- request = self.create_request("OBJECT_PUT", uri = src_uri, headers = headers)
|
|
| 934 |
+ request = self.create_request("OBJECT_PUT", uri=src_uri,
|
|
| 935 |
+ headers=headers) |
|
| 935 | 936 |
response = self.send_request(request) |
| 936 | 937 |
if response["data"] and getRootTagName(response["data"]) == "Error": |
| 937 | 938 |
#http://doc.s3.amazonaws.com/proposals/copy.html |
| 938 | 939 |
# Error during modify, status will be 200, so force error code 500 |
| 939 | 940 |
response["status"] = 500 |
| 940 |
- error("Server error during the MODIFY operation. Overwrite response status to 500")
|
|
| 941 |
+ error("Server error during the MODIFY operation. Overwrite "
|
|
| 942 |
+ "response status to 500") |
|
| 941 | 943 |
raise S3Error(response) |
| 942 | 944 |
|
| 943 | 945 |
if acl is not None: |
| ... | ... |
@@ -966,17 +971,17 @@ class S3(object): |
| 966 | 966 |
return response_copy |
| 967 | 967 |
|
| 968 | 968 |
def object_info(self, uri): |
| 969 |
- request = self.create_request("OBJECT_HEAD", uri = uri)
|
|
| 969 |
+ request = self.create_request("OBJECT_HEAD", uri=uri)
|
|
| 970 | 970 |
response = self.send_request(request) |
| 971 | 971 |
return response |
| 972 | 972 |
|
| 973 | 973 |
def get_acl(self, uri): |
| 974 | 974 |
if uri.has_object(): |
| 975 |
- request = self.create_request("OBJECT_GET", uri = uri,
|
|
| 976 |
- uri_params = {'acl': None})
|
|
| 975 |
+ request = self.create_request("OBJECT_GET", uri=uri,
|
|
| 976 |
+ uri_params={'acl': None})
|
|
| 977 | 977 |
else: |
| 978 |
- request = self.create_request("BUCKET_LIST", bucket = uri.bucket(),
|
|
| 979 |
- uri_params = {'acl': None})
|
|
| 978 |
+ request = self.create_request("BUCKET_LIST", bucket=uri.bucket(),
|
|
| 979 |
+ uri_params={'acl': None})
|
|
| 980 | 980 |
|
| 981 | 981 |
response = self.send_request(request) |
| 982 | 982 |
acl = ACL(response['data']) |