This is an automated email from the ASF dual-hosted git repository. tomaz pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/libcloud.git
commit 5fe0e8002fc8eb6ffe56219aeb4c730a9b81675c Author: Tomaz Muraus <[email protected]> AuthorDate: Fri May 6 23:15:49 2022 +0200 Simplify the code. --- libcloud/dns/drivers/godaddy.py | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/libcloud/dns/drivers/godaddy.py b/libcloud/dns/drivers/godaddy.py index 08539aa25..0ee0de96a 100644 --- a/libcloud/dns/drivers/godaddy.py +++ b/libcloud/dns/drivers/godaddy.py @@ -445,24 +445,15 @@ class GoDaddyDNSDriver(DNSDriver): return zones def _to_zone(self, item): - if "expires" not in item: - zone = Zone( - id=item["domainId"], - domain=item["domain"], - type="master", - ttl=None, - driver=self, - ) - if "expires" in item: - extra = {"expires": item["expires"]} - zone = Zone( - id=item["domainId"], - domain=item["domain"], - type="master", - ttl=None, - driver=self, - extra=extra, - ) + extra = {"expires": item.get("expires", None)} + zone = Zone( + id=item["domainId"], + domain=item["domain"], + type="master", + ttl=None, + driver=self, + extra=extra, + ) return zone def _to_records(self, items, zone=None):
