Index: boto/s3/bucket.py |
diff --git a/boto/s3/bucket.py b/boto/s3/bucket.py |
index 144edbff6d9272c86b8f458a74da04d2181aee8d..10200e3cd8c187986c1fcee26386c8de8a855d69 100644 |
--- a/boto/s3/bucket.py |
+++ b/boto/s3/bucket.py |
@@ -559,7 +559,9 @@ class Bucket(object): |
if src_version_id: |
src += '?version_id=%s' % src_version_id |
headers = {provider.copy_source_header : str(src)} |
- headers[provider.storage_class_header] = storage_class |
+ # make sure storage_class_header key exists before accessing it |
+ if provider.storage_class_header: |
+ headers[provider.storage_class_header] = storage_class |
if metadata: |
headers[provider.metadata_directive_header] = 'REPLACE' |
headers = boto.utils.merge_meta(headers, metadata, provider) |
@@ -614,8 +616,8 @@ class Bucket(object): |
response.status, response.reason, body) |
return body |
- def set_xml_acl(self, acl_str, key_name='', headers=None, version_id=None): |
- query_args = 'acl' |
+ def set_xml_acl(self, acl_str, key_name='', headers=None, version_id=None, |
+ query_args='acl'): |
if version_id: |
query_args += '&versionId=%s' % version_id |
response = self.connection.make_request('PUT', self.name, key_name, |