You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2017/04/01 02:48:54 UTC

[1/2] libcloud git commit: Explicitly check if response is None.

Repository: libcloud
Updated Branches:
  refs/heads/trunk 22cb3add4 -> 1ed588869


Explicitly check if response is None.

In versions of requests < 3.0, the __bool__/__nonzero__ method on RawResponse is
overloaded to return False if the status code is 4xx or 5xx.
Closes #1006


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/cbeebb1a
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/cbeebb1a
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/cbeebb1a

Branch: refs/heads/trunk
Commit: cbeebb1a1c08749f0ccc90b3d87a2b1cdc4288f9
Parents: 22cb3ad
Author: Richard Xia <rx...@sifive.com>
Authored: Wed Mar 8 22:41:04 2017 -0800
Committer: Anthony Shaw <an...@apache.org>
Committed: Sat Apr 1 13:42:09 2017 +1100

----------------------------------------------------------------------
 libcloud/common/base.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/cbeebb1a/libcloud/common/base.py
----------------------------------------------------------------------
diff --git a/libcloud/common/base.py b/libcloud/common/base.py
index c5759f3..de0c68a 100644
--- a/libcloud/common/base.py
+++ b/libcloud/common/base.py
@@ -282,7 +282,7 @@ class RawResponse(Response):
         self._error = None
         self._reason = None
         self.connection = connection
-        if response:
+        if response is not None:
             self.headers = lowercase_keys(dict(response.headers))
             self.error = response.reason
             self.status = response.status_code


[2/2] libcloud git commit: changes for #1006

Posted by an...@apache.org.
changes for #1006


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/1ed58886
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/1ed58886
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/1ed58886

Branch: refs/heads/trunk
Commit: 1ed588869b69e690a36fe8b14c0028c0e912fbf4
Parents: cbeebb1
Author: Anthony Shaw <an...@apache.org>
Authored: Sat Apr 1 13:43:28 2017 +1100
Committer: Anthony Shaw <an...@apache.org>
Committed: Sat Apr 1 13:43:28 2017 +1100

----------------------------------------------------------------------
 CHANGES.rst | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/1ed58886/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 58af255..dc4780a 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -12,6 +12,10 @@ Common
   [GITHUB-993]
   (David Halter)
 
+- Explicitly check if response is None in RawResponse class
+  [GITHUB-1006] [LIBCLOUD-901]
+  (Richard Xia)
+
 Compute
 ~~~~~~~