Repository: libcloud
Updated Branches:
  refs/heads/trunk 3745ffcaa -> abf026f8f


Fix node_list check - list_nodes now returns an empty list and not None.


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

Branch: refs/heads/trunk
Commit: 4b63b8ffad37bdcbf24bc46aefa6cf6c9894315d
Parents: 3745ffc
Author: Tomaz Muraus <[email protected]>
Authored: Tue Apr 7 14:44:04 2015 +0200
Committer: Tomaz Muraus <[email protected]>
Committed: Tue Apr 7 14:44:04 2015 +0200

----------------------------------------------------------------------
 libcloud/compute/drivers/azure.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/4b63b8ff/libcloud/compute/drivers/azure.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/azure.py 
b/libcloud/compute/drivers/azure.py
index 503d8d0..487265c 100644
--- a/libcloud/compute/drivers/azure.py
+++ b/libcloud/compute/drivers/azure.py
@@ -484,7 +484,7 @@ class AzureNodeDriver(NodeDriver):
 
             machine_config.domain_join = None
 
-            if node_list is None or ex_new_deployment:
+            if not node_list or ex_new_deployment:
                 port = "3389"
             else:
                 port = random.randint(41952, 65535)
@@ -509,7 +509,7 @@ class AzureNodeDriver(NodeDriver):
                 enable_direct_server_return=False
             )
         else:
-            if node_list is None or ex_new_deployment:
+            if not node_list or ex_new_deployment:
                 port = "22"
             else:
                 port = random.randint(41952, 65535)
@@ -572,7 +572,7 @@ class AzureNodeDriver(NodeDriver):
         # must be created using the add_role function.
         #
         # So, yeah, annoying.
-        if node_list is None or ex_new_deployment:
+        if not node_list or ex_new_deployment:
             # This is the first node in this cloud service.
 
             if not ex_deployment_name:

Reply via email to