From 2e2557c31c37c3266dcd812f50b2feb390e0714b Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Tue, 10 May 2016 09:57:17 -0700 Subject: [PATCH] unichr portability support --- dns/_compat.py | 2 ++ dns/name.py | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dns/_compat.py b/dns/_compat.py index 88416ee0..cffe4bb9 100644 --- a/dns/_compat.py +++ b/dns/_compat.py @@ -13,7 +13,9 @@ if sys.version_info > (3,): text_type = str binary_type = bytes string_types = (str,) + unichr = chr else: text_type = unicode binary_type = str string_types = (basestring,) + unichr = unichr diff --git a/dns/name.py b/dns/name.py index e8cb3513..e5b0107b 100644 --- a/dns/name.py +++ b/dns/name.py @@ -30,8 +30,7 @@ import encodings.idna import dns.exception import dns.wiredata -from ._compat import long, binary_type, text_type - +from ._compat import long, binary_type, text_type, unichr try: maxint = sys.maxint -- 2.47.3