From 8360f70024330eeeb5c53d29e4a05194f872b511 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Mon, 17 Oct 2016 15:15:22 +1300 Subject: First-order conversion to Python3-only - Zap various occurrences of Python2 in docs and scripts - Remove six from netlib, and some other places where obvious project-wide search and replace works. --- netlib/encoding.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'netlib/encoding.py') diff --git a/netlib/encoding.py b/netlib/encoding.py index 9b8b3868..f0f7381d 100644 --- a/netlib/encoding.py +++ b/netlib/encoding.py @@ -5,7 +5,6 @@ from __future__ import absolute_import import codecs import collections -import six from io import BytesIO import gzip @@ -91,7 +90,7 @@ def encode(decoded, encoding, errors='strict'): try: try: value = decoded - if not six.PY2 and isinstance(value, six.string_types): + if isinstance(value, str): value = decoded.encode() encoded = custom_encode[encoding](value) except KeyError: -- cgit v1.2.3