From: Remi Gacogne Date: Thu, 3 Oct 2019 09:53:48 +0000 (+0200) Subject: Implement python's to_text() for Cookies and Client Subnet options X-Git-Tag: dnsdist-1.4.0-rc4~42^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5610fe2de61db949cd36a2977470d7f43c7d2943;p=pdns Implement python's to_text() for Cookies and Client Subnet options --- diff --git a/regression-tests.dnsdist/clientsubnetoption.py b/regression-tests.dnsdist/clientsubnetoption.py index c4f78f25d..79deb2c98 100644 --- a/regression-tests.dnsdist/clientsubnetoption.py +++ b/regression-tests.dnsdist/clientsubnetoption.py @@ -189,6 +189,9 @@ class ClientSubnetOption(dns.edns.Option): self.scope ) + def to_text(self): + return self.__repr__() + def __eq__(self, other): """Rich comparison method for equality. diff --git a/regression-tests.dnsdist/cookiesoption.py b/regression-tests.dnsdist/cookiesoption.py index 15ab1722f..6b9204b3e 100644 --- a/regression-tests.dnsdist/cookiesoption.py +++ b/regression-tests.dnsdist/cookiesoption.py @@ -57,6 +57,9 @@ class CookiesOption(dns.edns.Option): self.server ) + def to_text(self): + return self.__repr__() + def __eq__(self, other): if not isinstance(other, CookiesOption): return False