Closed heikkiquixey closed 9 years ago
Looks good! I think there's something up in find_credentials:
python ./ali.py -S ecs -r cn-hangzhou Action=DescribeRegions
Traceback (most recent call last):
File "./ali.py", line 85, in <module>
secret_access_key=args.secret_access_key)
File "/home/adam/qsrc/python-aliyun/aliyun/connection.py", line 119, in __init__
creds = find_credentials()
File "/home/adam/qsrc/python-aliyun/aliyun/connection.py", line 79, in find_credentials
creds.access_key_id = cp.get('default', 'access_key_id')
AttributeError: can't set attribute
Ah yeah, namedtuples are immutable, and the config file discovery mechanism isn't working.
Wait, this code never worked?
Whoaaaaaaaaaa we were actually adding attributes to the namedtuple module not to the named tuple itself... and passing those around as if they were credentials.
@mquander @addumb Please review.