diff options
| author | Brian Wellington <bwelling@xbill.org> | 2020-10-29 16:27:56 -0700 |
|---|---|---|
| committer | Brian Wellington <bwelling@xbill.org> | 2020-10-29 16:27:56 -0700 |
| commit | ee12ebcddcdc0732c5c141ebae481a1877b5a1b3 (patch) | |
| tree | 2db7736f3370cfb4332b5d24bb8c5689bfd065c4 | |
| parent | 726b34133e2567c144d10f1aa9e6f73508cfd8bc (diff) | |
| download | dnspython-ee12ebcddcdc0732c5c141ebae481a1877b5a1b3.tar.gz | |
Add repr() for dns.tsig.Key.
| -rw-r--r-- | dns/tsig.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dns/tsig.py b/dns/tsig.py index 117b5e5..5c773ff 100644 --- a/dns/tsig.py +++ b/dns/tsig.py @@ -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()}'>" |
