From: tmerila Date: Wed, 3 Apr 2019 11:28:22 +0000 (+0300) Subject: Update zone.py X-Git-Tag: v2.0.0rc1~352^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2ce5102bf4224c157060a96253823aab191dadb;p=thirdparty%2Fdnspython.git 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. --- 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: