Skip to content

Commit

Permalink
Merge pull request #301 from sass/fixes_for_py4
Browse files Browse the repository at this point in the history
Use `not PY2` instead of `PY3` for python4.x compat
  • Loading branch information
asottile authored Aug 25, 2019
2 parents 0b3e8dc + 1b44bb9 commit a9c4d15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sass.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import sys
import warnings

from six import string_types, text_type, PY2, PY3
from six import string_types, text_type, PY2

import _sass
from sassutils._compat import collections_abc
Expand Down Expand Up @@ -52,7 +52,7 @@


def to_native_s(s):
if isinstance(s, bytes) and PY3: # pragma: no cover (py3)
if isinstance(s, bytes) and not PY2: # pragma: no cover (py3)
s = s.decode('UTF-8')
elif isinstance(s, text_type) and PY2: # pragma: no cover (py2)
s = s.encode('UTF-8')
Expand Down

0 comments on commit a9c4d15

Please sign in to comment.