From b2ce5102bf4224c157060a96253823aab191dadb Mon Sep 17 00:00:00 2001 From: tmerila Date: Wed, 3 Apr 2019 14:28:22 +0300 Subject: [PATCH] Update zone.py Need to also check that last TTL is known before using it as a fallback, otherwise ttl is never None in the last check, setting it incorrectly to 0 instead. --- dns/zone.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dns/zone.py b/dns/zone.py index 2b9157b9..7f5cb60d 100644 --- a/dns/zone.py +++ b/dns/zone.py @@ -814,7 +814,7 @@ class _MasterReader(object): raise dns.exception.SyntaxError("Missing default TTL value") if self.default_ttl_known: ttl = self.default_ttl - else: + elif self.last_ttl_known: ttl = self.last_ttl # Class try: -- 2.47.3