Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1805)

Unified Diff: boto/s3/bucket.py

Issue 8669001: Pull in upstream boto from github at bcb719937de9ac2851e632d62b777352029a6d55 (Closed) Base URL: svn://svn.chromium.org/boto
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « boto/rds/__init__.py ('k') | boto/sdb/__init__.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « boto/rds/__init__.py ('k') | boto/sdb/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698