libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [3/6] libcloud git commit: Fixed small style issues.
Date Tue, 05 Jul 2016 09:13:39 GMT
Fixed small style issues.


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

Branch: refs/heads/trunk
Commit: 9fbf6e7871441b67059f21b3de0e46a3ea8d8ef1
Parents: 4b0fd03
Author: Juan Font Alonso <juanfontalonso@gmail.com>
Authored: Mon Jul 4 17:12:27 2016 +0200
Committer: Anthony Shaw <anthonyshaw@apache.org>
Committed: Tue Jul 5 19:12:06 2016 +1000

----------------------------------------------------------------------
 libcloud/compute/drivers/vcloud.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/9fbf6e78/libcloud/compute/drivers/vcloud.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/vcloud.py b/libcloud/compute/drivers/vcloud.py
index 50cbd9a..722e9b9 100644
--- a/libcloud/compute/drivers/vcloud.py
+++ b/libcloud/compute/drivers/vcloud.py
@@ -2001,8 +2001,8 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
             # "section" section does not exist, insert it just
             # before "prev_section"
             for i, e in enumerate(res.object):
-                if e.tag == \
-                                '{http://www.vmware.com/vcloud/v1.5}%s' % prev_section:
+                tag = '{http://www.vmware.com/vcloud/v1.5}%s' % prev_section
+                if e.tag == tag:
                     break
             e = ET.Element(
                 '{http://www.vmware.com/vcloud/v1.5}%s' % section)
@@ -2030,10 +2030,9 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
             # must have AdminAutoLogonCount==0, even though
             # it might have AdminAutoLogonCount==1 when requesting it for
             # the first time.
-            auto_logon_enabled = res.object.find(
+            auto_logon = res.object.find(
                 fixxpath(res.object, "AdminAutoLogonEnabled"))
-            if (auto_logon_enabled is not None
-                and auto_logon_enabled.text=='false'):
+            if auto_logon is not None and auto_logon.text == 'false':
                 self._update_or_insert_section(res,
                                                "AdminAutoLogonCount",
                                                "ResetPasswordRequired",


Mime
View raw message