From: Bob Halley Date: Tue, 1 Sep 2020 14:19:28 +0000 (-0700) Subject: _as_ttl was not returning the value if converting from a string X-Git-Tag: v2.1.0rc1~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d534da4cefe0c0cc9abe86524e629843a0e0418b;p=thirdparty%2Fdnspython.git _as_ttl was not returning the value if converting from a string --- diff --git a/dns/rdata.py b/dns/rdata.py index c2c36afd..acf34aec 100644 --- a/dns/rdata.py +++ b/dns/rdata.py @@ -444,7 +444,7 @@ class Rdata: if isinstance(value, int): return cls._as_int(value, 0, dns.ttl.MAX_TTL) elif isinstance(value, str): - value = dns.ttl.from_text(value) + return dns.ttl.from_text(value) else: raise ValueError('not a TTL')