diff options
author | James Saryerwinnie <js@jamesls.com> | 2013-05-20 11:06:17 -0700 |
---|---|---|
committer | James Saryerwinnie <js@jamesls.com> | 2013-05-20 11:06:17 -0700 |
commit | 9e041710d63632aaa29dc041d503dbe5c69084ca (patch) | |
tree | d1e3d8c86660538fa67a3ccde6d8da519c6b6e19 /boto/glacier | |
parent | 008fad30c976cc99a5c4ac449a0e7cca1e92f57e (diff) | |
download | boto-9e041710d63632aaa29dc041d503dbe5c69084ca.tar.gz |
Adjust part size as needed in create_archive_from_file
Fixes #1478, original patch suggested by @dminkovsky.
If we have a large enough file such that the default part size
is not sufficient to stay within the maximum number of parts
allowed by glacier, we automatically adjust the part size
to the minimum required. We were previously calculating this
value but not actually doing anything with it.
Diffstat (limited to 'boto/glacier')
-rw-r--r-- | boto/glacier/vault.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/boto/glacier/vault.py b/boto/glacier/vault.py index 6e47bf76..ac019ac9 100644 --- a/boto/glacier/vault.py +++ b/boto/glacier/vault.py @@ -161,8 +161,7 @@ class Vault(object): if not file_obj: file_size = os.path.getsize(filename) try: - min_part_size = minimum_part_size(file_size, - self.DefaultPartSize) + part_size = minimum_part_size(file_size, part_size) except ValueError: raise UploadArchiveError("File size of %s bytes exceeds " "40,000 GB archive limit of Glacier.") |