uskudnik / amazon-glacier-cmd-interface

Command line interface for Amazon Glacier
MIT License
375 stars 103 forks source link

glacier-cmd --output csv error #136

Open a13x212 opened 11 years ago

a13x212 commented 11 years ago

When using glacier-cmd with the --output csv option and there is no output, it errors out.

without --output csv

ubuntu@ubuntu:~$ glacier-cmd --region us-west-1 lsvault No output!

with --output csv

ubuntu@ubuntu:~$ glacier-cmd --region us-west-1 --output csv lsvault Traceback (most recent call last): File "/usr/local/bin/glacier-cmd", line 9, in load_entry_point('glacier==0.2dev', 'console_scripts', 'glacier-cmd')() File "/usr/local/lib/python2.7/dist-packages/glacier-0.2dev-py2.7.egg/glacier/glacier.py", line 929, in main args.func(args) File "/usr/local/lib/python2.7/dist-packages/glacier-0.2dev-py2.7.egg/glacier/glacier.py", line 156, in wrapper return fn(_args, *_kwargs) File "/usr/local/lib/python2.7/dist-packages/glacier-0.2dev-py2.7.egg/glacier/glacier.py", line 177, in lsvault output_table(vault_list, args.output, keys=keys) File "/usr/local/lib/python2.7/dist-packages/glacier-0.2dev-py2.7.egg/glacier/glacier.py", line 82, in output_table keys = results[0].keys() IndexError: list index out of range

with --output json

ubuntu@ubuntu:~$ glacier-cmd --region us-west-1 --output json lsvault []