You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by er...@apache.org on 2015/07/13 23:00:05 UTC
libcloud git commit: [google] Fix repr of GCERoute when network is a
string
Repository: libcloud
Updated Branches:
refs/heads/trunk 961df98fa -> c4e4f8e2b
[google] Fix repr of GCERoute when network is a string
Closes #529
Signed-off-by: Eric Johnson <er...@google.com>
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/c4e4f8e2
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/c4e4f8e2
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/c4e4f8e2
Branch: refs/heads/trunk
Commit: c4e4f8e2b04ed608dfbc2a188bb624617d6327c4
Parents: 961df98
Author: Djoume Salvetti <dj...@users.noreply.github.com>
Authored: Thu May 28 14:27:32 2015 -0400
Committer: Eric Johnson <er...@google.com>
Committed: Mon Jul 13 20:59:24 2015 +0000
----------------------------------------------------------------------
libcloud/compute/drivers/gce.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/c4e4f8e2/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index ec5b6f4..0ade024 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -545,7 +545,9 @@ class GCERoute(UuidMixin):
def __repr__(self):
return '<GCERoute id="%s" name="%s" dest_range="%s" network="%s">' % (
- self.id, self.name, self.dest_range, self.network.name)
+ self.id, self.name, self.dest_range,
+ hasattr(self.network, 'name') and self.network.name or
+ self.network)
class GCENodeSize(NodeSize):