You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2015/11/27 07:31:09 UTC
[09/13] libcloud git commit: Use new ttl field,
use equality comparer when assessing length of records
Use new ttl field, use equality comparer when assessing length of records
Signed-off-by: Anthony Shaw <an...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/0b8007c9
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/0b8007c9
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/0b8007c9
Branch: refs/heads/trunk
Commit: 0b8007c9acb1ec012d7aaad374ddebe933dc4c63
Parents: 6d1804e
Author: Anthony Shaw <an...@gmail.com>
Authored: Fri Nov 27 15:32:43 2015 +1100
Committer: Anthony Shaw <an...@gmail.com>
Committed: Fri Nov 27 17:30:15 2015 +1100
----------------------------------------------------------------------
libcloud/dns/drivers/godaddy.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/0b8007c9/libcloud/dns/drivers/godaddy.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/godaddy.py b/libcloud/dns/drivers/godaddy.py
index 64dbd65..65fc33c 100644
--- a/libcloud/dns/drivers/godaddy.py
+++ b/libcloud/dns/drivers/godaddy.py
@@ -194,6 +194,7 @@ class GoDaddyDNSDriver(DNSDriver):
id=id, name=name,
type=type, data=data,
zone=zone, driver=self,
+ ttl=new_record['ttl'],
extra=extra)
def update_record(self, record, name, type, data, extra=None):
@@ -229,6 +230,7 @@ class GoDaddyDNSDriver(DNSDriver):
id=id, name=name,
type=type, data=data,
zone=record.zone, driver=self,
+ ttl=new_record['ttl'],
extra=extra)
def get_record(self, zone_id, record_id):
@@ -249,7 +251,7 @@ class GoDaddyDNSDriver(DNSDriver):
zone_id,
parts[1],
parts[0])).object
- if len(result) is 0:
+ if len(result) == 0:
raise RecordDoesNotExistError()
return self._to_record(result[0],
self.get_zone(zone_id))
@@ -445,7 +447,7 @@ class GoDaddyDNSDriver(DNSDriver):
record = Record(id=id, name=name,
type=type, data=item['data'],
zone=zone, driver=self,
- extra={'ttl': ttl})
+ ttl=ttl)
return record
def _to_tlds(self, items):