diff options
Diffstat (limited to 'dateutil/tz.py')
-rw-r--r-- | dateutil/tz.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/dateutil/tz.py b/dateutil/tz.py index 9df184b..e736d58 100644 --- a/dateutil/tz.py +++ b/dateutil/tz.py @@ -7,7 +7,7 @@ datetime module. __author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>" __license__ = "Simplified BSD" -from six import string_types +from six import string_types, PY3 import datetime import struct @@ -28,14 +28,13 @@ except (ImportError, OSError): tzwin, tzwinlocal = None, None def tzname_in_python2(myfunc): - import six """Change unicode output into bytestrings in Python 2 tzname() API changed in Python 3. It used to return bytes, but was changed to unicode strings """ def inner_func(*args, **kwargs): - if six.PY3: + if PY3: return myfunc(*args, **kwargs) else: return myfunc(*args, **kwargs).encode() |