diff options
| author | Bob Halley <halley@nominum.com> | 2010-10-17 16:34:22 +0100 |
|---|---|---|
| committer | Bob Halley <halley@nominum.com> | 2010-10-17 16:34:22 +0100 |
| commit | f437b7848886eee0d30a72e6e93cb377aae90e5a (patch) | |
| tree | 482f1f80b29904805a0b5b2dafc3297d87aa2c00 /dns/update.py | |
| parent | 8e222ad86c4aea7adb4c165953852fccb5e939ba (diff) | |
| download | dnspython-f437b7848886eee0d30a72e6e93cb377aae90e5a.tar.gz | |
Allow unicode strings for rdtype and rdclass parameters
Diffstat (limited to 'dns/update.py')
| -rw-r--r-- | dns/update.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dns/update.py b/dns/update.py index 4c1ed62..e67acaf 100644 --- a/dns/update.py +++ b/dns/update.py @@ -152,7 +152,7 @@ class Update(dns.message.Message): self._add_rr(name, 0, rd, dns.rdataclass.NONE) else: rdtype = args.pop(0) - if isinstance(rdtype, str): + if isinstance(rdtype, (str, unicode)): rdtype = dns.rdatatype.from_text(rdtype) if len(args) == 0: rrset = self.find_rrset(self.authority, name, @@ -210,7 +210,7 @@ class Update(dns.message.Message): self._add(False, self.answer, name, *args) else: rdtype = args[0] - if isinstance(rdtype, str): + if isinstance(rdtype, (str, unicode)): rdtype = dns.rdatatype.from_text(rdtype) rrset = self.find_rrset(self.answer, name, dns.rdataclass.ANY, rdtype, @@ -229,7 +229,7 @@ class Update(dns.message.Message): dns.rdatatype.NONE, None, True, True) else: - if isinstance(rdtype, str): + if isinstance(rdtype, (str, unicode)): rdtype = dns.rdatatype.from_text(rdtype) rrset = self.find_rrset(self.answer, name, dns.rdataclass.NONE, rdtype, |
