diff options
| author | Brian Wellington <bwelling@xbill.org> | 2020-05-21 10:53:24 -0700 |
|---|---|---|
| committer | Brian Wellington <bwelling@xbill.org> | 2020-05-21 10:53:24 -0700 |
| commit | a1cddfabca128d326b5e6b6eaab21dff7d2b5bcc (patch) | |
| tree | a128a04a92b3d192e72a67802624d19697f69fea /dns/message.py | |
| parent | 985d9d8d2b18576d063cd84864498cc7362f60b8 (diff) | |
| download | dnspython-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.py | 4 |
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, |
