From: ruohan.chen Date: Sat, 12 Dec 2015 08:59:05 +0000 (+0800) Subject: Unicode support bugfix X-Git-Tag: v1.13.0~19^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=937ac98067be5e3b03d889f147be1bd98ed0048e;p=thirdparty%2Fdnspython.git Unicode support bugfix --- diff --git a/dns/update.py b/dns/update.py index e6922269..8b214721 100644 --- a/dns/update.py +++ b/dns/update.py @@ -54,7 +54,7 @@ class Update(dns.message.Message): if isinstance(zone, (str, unicode)): zone = dns.name.from_text(zone) self.origin = zone - if isinstance(rdclass, str): + if isinstance(rdclass, (str, unicode)): rdclass = dns.rdataclass.from_text(rdclass) self.zone_rdclass = rdclass self.find_rrset(self.question, self.origin, rdclass, dns.rdatatype.SOA, @@ -103,7 +103,7 @@ class Update(dns.message.Message): self._add_rr(name, ttl, rd, section=section) else: rdtype = args.pop(0) - if isinstance(rdtype, str): + if isinstance(rdtype, (str, unicode)): rdtype = dns.rdatatype.from_text(rdtype) if replace: self.delete(name, rdtype)