Glacier: Raise exception on attempt to upload an empty archive #1082

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
2 participants

Currently you get a weird failure in tree_hash() instead:

Traceback (most recent call last):
  <snip>
  File "/home/pete/src/glacier-cli/boto/glacier/writer.py", line 65, in tree_hash
    return hashes[0]
IndexError: list index out of range

Amazon does not allow empty archives to be uploaded, so raising an exception specific to this error is correct.

FWIW I've also written a (much uglier) patch for glacier-cli to allow you to fake uploads of empty archives so git-annex works.

Robie Basak and others added some commits Sep 19, 2012

Add description to Vault.create_archive_from_file
Allow archive creation via create_archive_from_file to specify an
archive description.
Merge pull request #1001 from basak/add_description_parameter
Add description to Vault.create_archive_from_file

Ooops, sorry, wrong branch.

@petertodd petertodd closed this Oct 26, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment