Updated Branches:
  refs/heads/trunk 043c81ca4 -> 7a0497128

Issue LIBCLOUD-459: Support region without zone in GCE.

Patch by Charles Walker <charles dot walker dot 37 at gmail dot com>.

Signed-off-by: Tomaz Muraus <[email protected]>


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

Branch: refs/heads/trunk
Commit: 7a04971288791a02c1c335f9d36da2f90d892b5b
Parents: 043c81c
Author: Ubuntu <[email protected]>
Authored: Wed Dec 11 17:24:08 2013 +0000
Committer: Tomaz Muraus <[email protected]>
Committed: Wed Dec 11 23:53:48 2013 +0100

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/7a049712/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 6c7ceeb..6d74ee3 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -2603,7 +2603,7 @@ class GCENodeDriver(NodeDriver):
         extra['description'] = region['description']
 
         quotas = region.get('quotas')
-        zones = [self.ex_get_zone(z) for z in region['zones']]
+        zones = [self.ex_get_zone(z) for z in region.get('zones', [])]
         # Work around a bug that will occasionally list missing zones in the
         # region output
         zones = [z for z in zones if z is not None]

Reply via email to