Permalink
Browse files

Merge pull request #1001 from basak/add_description_parameter

Add description to Vault.create_archive_from_file
  • Loading branch information...
2 parents 85fc603 + 95610c1 commit fbb516914d286a691432cbca87c1cf564fdc57e4 @garnaat garnaat committed Sep 20, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 boto/glacier/vault.py
View
5 boto/glacier/vault.py
@@ -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.
@@ -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:

0 comments on commit fbb5169

Please sign in to comment.