Skip to content

Commit 590826c

Browse files
committed
using six to test for py2
1 parent 3e1a040 commit 590826c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ncldDump/ncldDump.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from __future__ import print_function
2-
from six import string_types
2+
from six import string_types, PY2
33

44
import argparse
55
import jinja2
@@ -151,7 +151,7 @@ def convertToStringHook(item, ignoreDicts = False):
151151
# alone.
152152
#
153153
if isinstance(item, string_types):
154-
if sys.version_info[0] < 3:
154+
if PY2:
155155
result = item.encode('utf-8')
156156
else:
157157
result = item

0 commit comments

Comments
 (0)