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: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F8375%2Fhead;p=thirdparty%2Fpdns.git 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 c4f78f25d2..79deb2c98d 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 15ab1722f0..6b9204b3e5 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