summaryrefslogtreecommitdiff
path: root/dns/message.py
diff options
context:
space:
mode:
authorBrian Wellington <bwelling@xbill.org>2020-05-21 10:53:24 -0700
committerBrian Wellington <bwelling@xbill.org>2020-05-21 10:53:24 -0700
commita1cddfabca128d326b5e6b6eaab21dff7d2b5bcc (patch)
treea128a04a92b3d192e72a67802624d19697f69fea /dns/message.py
parent985d9d8d2b18576d063cd84864498cc7362f60b8 (diff)
downloaddnspython-a1cddfabca128d326b5e6b6eaab21dff7d2b5bcc.tar.gz
Remove dns.rdata{type,class}.to_enum.
These methods (which convert a str/int into an enum/int) shouldn't be commonly used by external code, so don't need to exist at the module level. The make() method on the enum class (renamed from to_enum()) can still be used, and the internal callers have been updated to use it.
Diffstat (limited to 'dns/message.py')
-rw-r--r--dns/message.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/dns/message.py b/dns/message.py
index 3446d1f..931a14a 100644
--- a/dns/message.py
+++ b/dns/message.py
@@ -1110,8 +1110,8 @@ def make_query(qname, rdtype, rdclass=dns.rdataclass.IN, use_edns=None,
if isinstance(qname, str):
qname = dns.name.from_text(qname, idna_codec=idna_codec)
- rdtype = dns.rdatatype.to_enum(rdtype)
- rdclass = dns.rdataclass.to_enum(rdclass)
+ rdtype = dns.rdatatype.RdataType.make(rdtype)
+ rdclass = dns.rdataclass.RdataClass.make(rdclass)
m = Message()
m.flags |= dns.flags.RD
m.find_rrset(m.question, qname, rdclass, rdtype, create=True,