libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [1/9] libcloud git commit: fix comparison by using value rather than reference
Date Mon, 10 Jul 2017 08:48:20 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk cfe02ecaf -> d6dba50de


fix comparison by using value rather than reference


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

Branch: refs/heads/trunk
Commit: 7ab8b8dff5b0289f1a963d9a087ad30178fa43c5
Parents: ef662f2
Author: jhelie <jean.helie@gmail.com>
Authored: Thu Jul 6 09:33:48 2017 +0100
Committer: Anthony Shaw <anthonyshaw@apache.org>
Committed: Mon Jul 10 09:48:02 2017 +0100

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/7ab8b8df/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 420914b..fd8bc6c 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -4536,7 +4536,7 @@ class GCENodeDriver(NodeDriver):
             maint_opts = ['MIGRATE', 'TERMINATE']
             if isinstance(on_host_maintenance,
                           str) and on_host_maintenance in maint_opts:
-                if preemptible is True and on_host_maintenance is 'MIGRATE':
+                if preemptible is True and on_host_maintenance == 'MIGRATE':
                     raise ValueError(("host maintenance cannot be 'MIGRATE' "
                                       "if instance is preemptible."))
                 scheduling['onHostMaintenance'] = on_host_maintenance
@@ -7415,7 +7415,7 @@ class GCENodeDriver(NodeDriver):
         # Disk names are not unique across zones, so if zone is None or
         # 'all', we return the first one we find for that disk name.  For
         # consistency, we sort by keys and set the zone to the first key.
-        if zone is None or zone is 'all':
+        if zone is None or zone == 'all':
             zone = sorted(self._ex_volume_dict[volume_name])[0]
 
         volume = self._ex_volume_dict[volume_name].get(zone, None)


Mime
View raw message