Skip to content

Commit

Permalink
script glacier upload now returns the ArchiveID
Browse files Browse the repository at this point in the history
  • Loading branch information
arterrey committed Feb 10, 2015
1 parent ac35f50 commit 6ac5394
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bin/glacier
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,12 @@ def upload_files(vault_name, filenames, region, access_key=None, secret_key=None
glacier_vault = layer2.get_vault(vault_name)
for filename in filenames:
if isfile(filename):
print('Uploading %s to %s' % (filename, vault_name))
glacier_vault.upload_archive(filename, description = basename(filename))

sys.stdout.write('Uploading %s to %s...' % (filename, vault_name))
sys.stdout.flush()
archive_id = glacier_vault.upload_archive(
filename,
description = basename(filename))
print(' done. Vault returned ArchiveID %s' % archive_id)

def main():
if len(sys.argv) < 2:
Expand Down

0 comments on commit 6ac5394

Please sign in to comment.