diff options
Diffstat (limited to 'designate/agent/handler.py')
-rw-r--r-- | designate/agent/handler.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/designate/agent/handler.py b/designate/agent/handler.py index 4aa644f5..008f40ca 100644 --- a/designate/agent/handler.py +++ b/designate/agent/handler.py @@ -30,7 +30,6 @@ import dns.rcode import dns.message import dns.flags import dns.opcode -import six from oslo_config import cfg from oslo_log import log as logging @@ -106,7 +105,7 @@ class RequestHandler(object): question = request.question[0] requester = request.environ['addr'][0] zone_name = question.name.to_text() - if six.PY3 and isinstance(zone_name, bytes): + if isinstance(zone_name, bytes): zone_name = zone_name.decode('utf-8') if not self._allowed(request, requester, "CREATE", zone_name): @@ -159,7 +158,7 @@ class RequestHandler(object): question = request.question[0] requester = request.environ['addr'][0] zone_name = question.name.to_text() - if six.PY3 and isinstance(zone_name, bytes): + if isinstance(zone_name, bytes): zone_name = zone_name.decode('utf-8') if not self._allowed(request, requester, "NOTIFY", zone_name): @@ -212,7 +211,7 @@ class RequestHandler(object): question = request.question[0] requester = request.environ['addr'][0] zone_name = question.name.to_text() - if six.PY3 and isinstance(zone_name, bytes): + if isinstance(zone_name, bytes): zone_name = zone_name.decode('utf-8') if not self._allowed(request, requester, "DELETE", zone_name): |