Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1001 from basak/add_description_parameter
Browse files Browse the repository at this point in the history
Add description to Vault.create_archive_from_file
  • Loading branch information
garnaat committed Sep 20, 2012
2 parents 85fc603 + 95610c1 commit fbb5169
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions boto/glacier/vault.py
Expand Up @@ -115,7 +115,8 @@ def create_archive_writer(self, part_size=DefaultPartSize,
description)
return Writer(self, response['UploadId'], part_size=part_size)

def create_archive_from_file(self, filename=None, file_obj=None):
def create_archive_from_file(self, filename=None, file_obj=None,
description=None):
"""
Create a new archive and upload the data from the given file
or file-like object.
Expand All @@ -132,7 +133,7 @@ def create_archive_from_file(self, filename=None, file_obj=None):
if not file_obj:
file_obj = open(filename, "rb")

writer = self.create_archive_writer()
writer = self.create_archive_writer(description=description)
while True:
data = file_obj.read(self.DefaultPartSize)
if not data:
Expand Down

0 comments on commit fbb5169

Please sign in to comment.