summaryrefslogtreecommitdiff
path: root/dns/rrset.py
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2006-04-26 01:00:14 +0000
committerBob Halley <halley@dnspython.org>2006-04-26 01:00:14 +0000
commite54dffd5b97cd49e7eace75c30d2127b5caae682 (patch)
treea96707ec3999080c9ce624b72cf04680834a4a09 /dns/rrset.py
parentd428c45191faee0e0c64f1076e5d632fe0c0c1e5 (diff)
downloaddnspython-e54dffd5b97cd49e7eace75c30d2127b5caae682.tar.gz
add RRset.to_rdataset()
Diffstat (limited to 'dns/rrset.py')
-rw-r--r--dns/rrset.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/dns/rrset.py b/dns/rrset.py
index f9b8736..185ec6e 100644
--- a/dns/rrset.py
+++ b/dns/rrset.py
@@ -107,6 +107,13 @@ class RRset(dns.rdataset.Rdataset):
return super(RRset, self).to_wire(self.name, file, compress, origin,
self.deleting, **kw)
+ def to_rdataset(self):
+ """Convert an RRset into an Rdataset.
+
+ #rtype: dns.rdataset.Rdataset object
+ """
+ return dns.rdataset.from_rdata_list(self.ttl, list(self))
+
def from_text_list(name, ttl, rdclass, rdtype, text_rdatas):
"""Create an RRset with the specified name, TTL, class, and type, and with