diff options
author | Bob Halley <halley@dnspython.org> | 2020-09-01 07:19:28 -0700 |
---|---|---|
committer | Bob Halley <halley@dnspython.org> | 2020-09-01 07:19:28 -0700 |
commit | d534da4cefe0c0cc9abe86524e629843a0e0418b (patch) | |
tree | 711720640d5c6044b60ede4ec07f3b7a56a16f91 | |
parent | 650369cd3b76a5ef89676b90cf1be71fd44ea67c (diff) | |
download | dnspython-d534da4cefe0c0cc9abe86524e629843a0e0418b.tar.gz |
_as_ttl was not returning the value if converting from a string
-rw-r--r-- | dns/rdata.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dns/rdata.py b/dns/rdata.py index c2c36af..acf34ae 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') |