Merge branch 'trunk' into libcloud_910
diff --git a/CHANGES.rst b/CHANGES.rst
index 07b992b..f2b1c5f 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -12,6 +12,10 @@
[GITHUB-970]
(Anthony Shaw)
+- Fix for Linode classes since 2.0x
+ [GITHUB-1026]
+ (Anthony Shaw)
+
Compute
~~~~~~~
diff --git a/libcloud/common/linode.py b/libcloud/common/linode.py
index c991695..7c120e3 100644
--- a/libcloud/common/linode.py
+++ b/libcloud/common/linode.py
@@ -16,9 +16,6 @@
from libcloud.common.base import ConnectionKey, JsonResponse
from libcloud.common.types import InvalidCredsError
-from libcloud.utils.py3 import PY3
-from libcloud.utils.py3 import b
-
__all__ = [
'API_HOST',
'API_ROOT',
@@ -82,26 +79,8 @@
:keyword response: The raw response returned by urllib
:return: parsed :class:`LinodeResponse`"""
-
- self.connection = connection
-
- self.headers = dict(response.getheaders())
- self.error = response.reason
- self.status = response.status
-
- # This attribute is set when using LoggingConnection.
- original_data = getattr(response, '_original_data', None)
-
- if original_data:
- # LoggingConnection already decompresses data so it can log it
- # which means we don't need to decompress it here.
- self.body = response._original_data
- else:
- self.body = self._decompress_response(body=response.read(),
- headers=self.headers)
-
- if PY3:
- self.body = b(self.body).decode('utf-8')
+ self.errors = []
+ super(LinodeResponse, self).__init__(response, connection)
self.invalid = LinodeException(0xFF,
"Invalid JSON received from server")