]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
_as_ttl was not returning the value if converting from a string
authorBob Halley <halley@dnspython.org>
Tue, 1 Sep 2020 14:19:28 +0000 (07:19 -0700)
committerBob Halley <halley@dnspython.org>
Tue, 1 Sep 2020 14:19:28 +0000 (07:19 -0700)
dns/rdata.py

index c2c36afd979547fcf9b6a49d4625ce10be975d34..acf34aecbf8c18ff2c11ea2a64c06a9fdea5b3da 100644 (file)
@@ -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')