linode-python
linode-python copied to clipboard
fallthrough generic_request doesn't work?
I've been trying to call linode_clone
and linode_config_create
unsuccessfully. For the latter, I would get errors of this nature:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/storage/development/envs/linode/local/lib/python2.7/site-packages/linode/api.py", line 243, in generic_request
return self.__send_request(request)
File "/storage/development/envs/linode/local/lib/python2.7/site-packages/linode/api.py", line 283, in __send_request
raise ApiError(s['ERRORARRAY'])
linode.api.ApiError: [{u'ERRORCODE': 3, u'ERRORMESSAGE': u'The requested class does not exist'}]
The errors appear to come from upstream in JSON, but they are triggered by this chunk of code which is trying to do some assumptions (and is apparently failing): https://github.com/tjfontaine/linode-python/blob/master/linode/api.py#L235-L246
For my particular use case, I wrote both function calls into the api explicitly and they worked fine. That's unrelated, besides the fact that the functions do work when written explicitly but not when handed to the fallback.