]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Add repr() for dns.tsig.Key.
authorBrian Wellington <bwelling@xbill.org>
Thu, 29 Oct 2020 23:27:56 +0000 (16:27 -0700)
committerBrian Wellington <bwelling@xbill.org>
Thu, 29 Oct 2020 23:27:56 +0000 (16:27 -0700)
dns/tsig.py

index 117b5e5e83a5eb979db1f77f1308734e681cfcae..5c773fffa21430c1c5b49666ccf3b6f6693b67be 100644 (file)
@@ -336,3 +336,8 @@ class Key:
                 self.name == other.name and
                 self.secret == other.secret and
                 self.algorithm == other.algorithm)
+
+    def __repr__(self):
+        return f"<DNS key name='{self.name}', " + \
+               f"algorithm='{self.algorithm}', " + \
+               f"secret='{base64.b64encode(self.secret).decode()}'>"