]> git.ipfire.org Git - thirdparty/dnspython.git/commit
Improve rdataset/rrset repr to include rdata. 438/head
authorBrian Wellington <bwelling@xbill.org>
Wed, 1 Apr 2020 19:49:21 +0000 (12:49 -0700)
committerBrian Wellington <bwelling@xbill.org>
Wed, 1 Apr 2020 19:49:21 +0000 (12:49 -0700)
commit2e5fc5a6ff87d254020d713eaba9c8942221a500
tree1474c1c7f45ecae97e7977461522c7ec0b4bd05e
parent665f8b0cedbf1a416b29664abd4ba1e1f28a789a
Improve rdataset/rrset repr to include rdata.

Previously, repr() of rdataset/rrset looked like this:
<DNS IN A rdataset>
<DNS IN TXT rdataset>
<DNS IN RRSIG rdataset>

<DNS example. IN A RRset>
<DNS example. IN TXT RRset>
<DNS example. IN RRSIG(NSEC) RRset>

With this patch, it they look like:
<DNS IN A rdataset: [<1.2.3.4>, <5.6.7.8>]>
<DNS IN TXT rdataset: [<"foo" "bar">, <"baz">]>
<DNS IN RRSIG(NSEC) rdataset: [<NSEC 1 3 3600 20200101000000 20030101000000 2143 foo MxFcby9k/yvedMfQgKzhH5er0Mu/vILz 45IkskceFGgiWC...>]>

<DNS example. IN A RRset: [<1.2.3.4>, <5.6.7.8>]>
<DNS example. IN TXT RRset: [<"foo" "bar">, <"baz">]>
<DNS example. IN RRSIG(NSEC) RRset: [<NSEC 1 3 3600 20200101000000 20030101000000 2143 foo MxFcby9k/yvedMfQgKzhH5er0Mu/vILz 45IkskceFGgiWC...>]>

Note that each rdata is truncated to 100 characters.
dns/rdataset.py
dns/rrset.py