From d534da4cefe0c0cc9abe86524e629843a0e0418b Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Tue, 1 Sep 2020 07:19:28 -0700 Subject: [PATCH] _as_ttl was not returning the value if converting from a string --- dns/rdata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') -- 2.47.3