Commits

Alexander Solovyov committed 986a3cb

fix encodings on py2

Comments (0)

Files changed (1)

     based on the locale (to match open() decoding in the same manner).
     """
     # This is absurd. Surely there's a better way?!
-    if sys.platform == 'win32' or sys.version_info == 2:
+    if sys.platform == 'win32' or sys.version_info[0] == 2:
         return s
     return s.encode(locale.getpreferredencoding())