libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [3/6] git commit: Add explicit 'return None' to the function.
Date Mon, 08 Jul 2013 11:05:40 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/c0cc8f98
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/c0cc8f98
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/c0cc8f98

Branch: refs/heads/trunk
Commit: c0cc8f9869ea160a631a4c70cb6ec97e18ca3d3a
Parents: 137dcc3
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 12:59:22 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/c0cc8f98/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