]> granicus.if.org Git - pdns/commitdiff
Implement python's to_text() for Cookies and Client Subnet options
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 3 Oct 2019 09:53:48 +0000 (11:53 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 3 Oct 2019 09:53:48 +0000 (11:53 +0200)
regression-tests.dnsdist/clientsubnetoption.py
regression-tests.dnsdist/cookiesoption.py

index c4f78f25d28b1a6bfb08965e3a4a735119365992..79deb2c98d3dbea195a5ea4cb94d26611ee1a656 100644 (file)
@@ -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.
 
index 15ab1722f0f5c12bb384a5d9082c6a6ef23b2bc0..6b9204b3e5487e2e32f5738d550322500ef5c8c6 100644 (file)
@@ -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