percolate / ec2-security-groups-dumper

Dump your EC2 Security Groups as a CSV or JSON file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error while using CSV flag

abdulirfan3 opened this issue · comments

@lra
here is what i get. again the JSON works fine, it is the CSV

[root@ip-10-0-1-32 ~]# ec2-security-groups-dumper --csv
Traceback (most recent call last):
File "/usr/local/bin/ec2-security-groups-dumper", line 9, in
load_entry_point('ec2-security-groups-dumper==1.1', 'console_scripts', 'ec2-security-groups-dumper')()
File "/usr/local/lib/python2.6/site-packages/ec2_security_groups_dumper/main.py", line 281, in main
print firewall.csv
File "/usr/local/lib/python2.6/site-packages/ec2_security_groups_dumper/main.py", line 213, in csv
writer.writeheader()
AttributeError: DictWriter instance has no attribute 'writeheader'
[root@ip-10-0-1-32 ~]#

@abdulirfan3 it looks like you're using Python 2.6; this script uses the writeheader attribute of the DictWriter class, which requires Python 2.7. If Python 2.7 is available in your environment, you should consider upgrading.

or feel free to submit a PR to support py26 ;)