libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [12/14] libcloud git commit: Make Record.__repr__ more friendly - use zone.domain if available instead of zone.id.
Date Sun, 06 Dec 2015 06:32:50 GMT
Make Record.__repr__ more friendly - use zone.domain if available instead of
zone.id.


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

Branch: refs/heads/trunk
Commit: 1972754efde3019024de1ca3df417a68c9cb3578
Parents: 0f2a57b
Author: Tomaz Muraus <tomaz@tomaz.me>
Authored: Sun Dec 6 14:21:34 2015 +0800
Committer: Tomaz Muraus <tomaz@tomaz.me>
Committed: Sun Dec 6 14:21:34 2015 +0800

----------------------------------------------------------------------
 libcloud/dns/base.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/1972754e/libcloud/dns/base.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/base.py b/libcloud/dns/base.py
index f557c85..6f7cb14 100644
--- a/libcloud/dns/base.py
+++ b/libcloud/dns/base.py
@@ -143,9 +143,10 @@ class Record(object):
         return record_id
 
     def __repr__(self):
+        zone = self.zone.domain if self.zone.domain else self.zone.id
         return ('<Record: zone=%s, name=%s, type=%s, data=%s, provider=%s, '
                 'ttl=%s ...>' %
-                (self.zone.id, self.name, self.type, self.data,
+                (zone, self.name, self.type, self.data,
                  self.driver.name, self.ttl))
 
 


Mime
View raw message