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

Unified Diff: third_party/boto/boto/s3/key.py

Issue 698893003: Update checked in version of gsutil to version 4.6 (Closed) Base URL: http://dart.googlecode.com/svn/third_party/gsutil/
Patch Set: Created 6 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 | « third_party/boto/boto/s3/connection.py ('k') | third_party/boto/boto/s3/lifecycle.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/boto/boto/s3/key.py
===================================================================
--- third_party/boto/boto/s3/key.py (revision 33376)
+++ third_party/boto/boto/s3/key.py (working copy)
@@ -217,7 +217,8 @@
self.delete_marker = False
def handle_restore_headers(self, response):
- header = response.getheader('x-amz-restore')
+ provider = self.bucket.connection.provider
+ header = response.getheader(provider.restore_header)
if header is None:
return
parts = header.split(',', 1)
@@ -299,6 +300,7 @@
self.content_disposition = value
self.handle_version_headers(self.resp)
self.handle_encryption_headers(self.resp)
+ self.handle_restore_headers(self.resp)
self.handle_addl_headers(self.resp.getheaders())
def open_write(self, headers=None, override_num_retries=None):
@@ -1416,6 +1418,14 @@
headers/values that will override any headers associated
with the stored object in the response. See
http://goo.gl/EWOPb for details.
+
+ :type version_id: str
+ :param version_id: The ID of a particular version of the object.
+ If this parameter is not supplied but the Key object has
+ a ``version_id`` attribute, that value will be used when
+ retrieving the object. You can set the Key object's
+ ``version_id`` attribute to None to always grab the latest
+ version from a version-enabled bucket.
"""
self._get_file_internal(fp, headers=headers, cb=cb, num_cb=num_cb,
torrent=torrent, version_id=version_id,
@@ -1573,6 +1583,14 @@
headers/values that will override any headers associated
with the stored object in the response. See
http://goo.gl/EWOPb for details.
+
+ :type version_id: str
+ :param version_id: The ID of a particular version of the object.
+ If this parameter is not supplied but the Key object has
+ a ``version_id`` attribute, that value will be used when
+ retrieving the object. You can set the Key object's
+ ``version_id`` attribute to None to always grab the latest
+ version from a version-enabled bucket.
"""
if self.bucket is not None:
if res_download_handler:
@@ -1629,6 +1647,14 @@
headers/values that will override any headers associated
with the stored object in the response. See
http://goo.gl/EWOPb for details.
+
+ :type version_id: str
+ :param version_id: The ID of a particular version of the object.
+ If this parameter is not supplied but the Key object has
+ a ``version_id`` attribute, that value will be used when
+ retrieving the object. You can set the Key object's
+ ``version_id`` attribute to None to always grab the latest
+ version from a version-enabled bucket.
"""
try:
with open(filename, 'wb') as fp:
@@ -1687,6 +1713,14 @@
with the stored object in the response. See
http://goo.gl/EWOPb for details.
+ :type version_id: str
+ :param version_id: The ID of a particular version of the object.
+ If this parameter is not supplied but the Key object has
+ a ``version_id`` attribute, that value will be used when
+ retrieving the object. You can set the Key object's
+ ``version_id`` attribute to None to always grab the latest
+ version from a version-enabled bucket.
+
:rtype: string
:returns: The contents of the file as a string
"""
« no previous file with comments | « third_party/boto/boto/s3/connection.py ('k') | third_party/boto/boto/s3/lifecycle.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698