Fix invalid usage of JsonResponse class on the Ovh driver - we need to
use OvhResponse class to parse_error() is correctly used.
Before that on invalid credentials user would receive this error:
libcloud.common.exceptions.BaseHTTPError: <exception str() failed>
Now a correct error is returned:
libcloud.common.exceptions.BaseHTTPError: {"message":"Invalid application key"}
@@ -146,6 +146,8 @@ class OvhConnection(ConnectionUserAndKey):
'Used host: %s. Original error: %s' %
(self.host, str(e)))
+ response = OvhResponse(httpcon.getresponse(), httpcon)
+
if response.status == httplib.UNAUTHORIZED:
raise InvalidCredsError()
