diff options
author | James Saryerwinnie <js@jamesls.com> | 2012-09-17 10:04:53 -0700 |
---|---|---|
committer | James Saryerwinnie <js@jamesls.com> | 2012-09-17 10:04:53 -0700 |
commit | 5e1a8ab6a2f1536484b2e811de0d65864a6b7349 (patch) | |
tree | da0aacac67293a04470c10b6edbb23526137be35 | |
parent | 667f05a3bee66695fa88f4a44890a6f59836d0b9 (diff) | |
parent | 508e1c127e8523492b64ba10f658761403b8f5e1 (diff) | |
download | boto-5e1a8ab6a2f1536484b2e811de0d65864a6b7349.tar.gz |
Merge branch 'win-binary-file' into glacier
-rw-r--r-- | boto/glacier/vault.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/boto/glacier/vault.py b/boto/glacier/vault.py index 4db86dac..48d2a405 100644 --- a/boto/glacier/vault.py +++ b/boto/glacier/vault.py @@ -90,8 +90,9 @@ class Vault(object): """ with open(filename, 'rb') as fileobj: linear_hash, tree_hash = compute_hashes_from_fileobj(fileobj) - response = self.layer1.upload_archive(self.name, open(filename), - linear_hash, tree_hash) + fileobj.seek(0) + response = self.layer1.upload_archive(self.name, fileobj, + linear_hash, tree_hash) return response['ArchiveId'] def create_archive_writer(self, part_size=DefaultPartSize, |