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

cli: fix error on errors #97

Closed greut closed 5 years ago

greut commented 5 years ago

silly traceback...

cs.client.CloudStackException: ('HTTP 401 response from CloudStack', {'errorcode': 401, 'errortext': 'unable to verify user credentials and/or request signature', 'uuidList': []})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/yoan/.local/bin/cs", line 10, in <module>
    sys.exit(main())
  File "/home/yoan/.local/lib/python3.7/site-packages/cs/__init__.py", line 111, in main
    sys.stderr.write("\n".join(e.args))
TypeError: sequence item 1: expected str instance, dict found

then

CloudStack error: HTTP 401 response from CloudStack
{'errorcode': 401, 'errortext': 'unable to verify user credentials and/or request signature', 'uuidList': []}
{
  "errorresponse": {
    "errorcode": 401,
    "errortext": "unable to verify user credentials and/or request signature",
    "uuidList": []
  }
}