exoscale / cs

A simple, yet powerful CloudStack API client for python and the command-line.
BSD 3-Clause "New" or "Revised" License
88 stars 36 forks source link

client: restore error when section is missing #84

Closed greut closed 5 years ago

greut commented 5 years ago

the configuration refactoring #76 introduced a regression regarding the error raised when the region doesn't exist in the ini file.

% cs -r foo listZones
Traceback (most recent call last):
...
ValueError: endpointthe configuration is missing the following keys: , keythe configuration is missing the following keys: , secret

then

[foo] doesn't exist in the ini file.

% cs -r foo listZones       
Error: region 'foo' not in config

[foo] is incomplete in the ini file.

% cs -r foo listZones
Traceback (most recent call last):
....
ValueError: the configuration is missing the following keys: endpoint, key, secret