libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [6/6] git commit: Add explicit 'return None' to the function.
Date Mon, 08 Jul 2013 11:05:43 GMT
Add explicit 'return None' to the function.


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

Branch: refs/heads/0.13.x
Commit: 36f8a94d2f9671bda2eb68245de7a700dfbeb98c
Parents: 4c7a1de
Author: Tomaz Muraus <tomaz@apache.org>
Authored: Mon Jul 8 12:59:22 2013 +0200
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Mon Jul 8 13:00:15 2013 +0200

----------------------------------------------------------------------
 libcloud/compute/drivers/opennebula.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/36f8a94d/libcloud/compute/drivers/opennebula.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/opennebula.py b/libcloud/compute/drivers/opennebula.py
index da7af07..cf30e74 100644
--- a/libcloud/compute/drivers/opennebula.py
+++ b/libcloud/compute/drivers/opennebula.py
@@ -896,9 +896,10 @@ class OpenNebula_2_0_NodeDriver(OpenNebulaNodeDriver):
         # per node.
         if len(disks) > 1:
             return disks
-
-        if len(disks) == 1:
+        elif len(disks) == 1:
             return disks[0]
+        else:
+            return None
 
     def _extract_size(self, compute):
         """


Mime
View raw message