libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject libcloud git commit: Update Route53 driver so the _to_record doesn't throw an exception if a response is missing TTL attribute.
Date Mon, 31 Aug 2015 22:26:25 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk 0f4b01fde -> 1df5767ac


Update Route53 driver so the _to_record doesn't throw an exception if a response
is missing TTL attribute.


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

Branch: refs/heads/trunk
Commit: 1df5767ac82049b1bf480f7b07f5c04aed28d75f
Parents: 0f4b01f
Author: Tomaz Muraus <tomaz@apache.org>
Authored: Tue Sep 1 00:20:26 2015 +0200
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Tue Sep 1 00:20:26 2015 +0200

----------------------------------------------------------------------
 libcloud/dns/drivers/route53.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/1df5767a/libcloud/dns/drivers/route53.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/route53.py b/libcloud/dns/drivers/route53.py
index fe27f2e..db3514b 100644
--- a/libcloud/dns/drivers/route53.py
+++ b/libcloud/dns/drivers/route53.py
@@ -480,7 +480,9 @@ class Route53DNSDriver(DNSDriver):
 
         type = self._string_to_record_type(findtext(element=elem, xpath='Type',
                                                     namespace=NAMESPACE))
-        ttl = int(findtext(element=elem, xpath='TTL', namespace=NAMESPACE))
+        ttl = findtext(element=elem, xpath='TTL', namespace=NAMESPACE)
+        if ttl is not None:
+            ttl = int(ttl)
 
         value_elem = elem.findall(
             fixxpath(xpath='ResourceRecords/ResourceRecord',


Mime
View raw message