diff options
author | Victor Stinner <vstinner@redhat.com> | 2015-11-05 14:18:33 +0100 |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2015-11-05 14:18:33 +0100 |
commit | 925efaea8cbefb6e5a36e3524b6457da0880c520 (patch) | |
tree | 662c42c6c6496402b3389fc8fee8ba39f2de26e2 | |
parent | c86685a3fe0ff0b6f813d90677f67a4faf662791 (diff) | |
download | pep8-925efaea8cbefb6e5a36e3524b6457da0880c520.tar.gz |
fix BytesWarning on Python 3
On Python 3, when python3 with run with -bb, comparison between bytes
and str raises a BytesWarning exception. Test the Python version
instead of testing '' == b''.
-rwxr-xr-x | pep8.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1171,7 +1171,7 @@ def python_3000_backticks(logical_line): ############################################################################## -if '' == ''.encode(): +if sys.version_info < (3,): # Python 2: implicit encoding. def readlines(filename): """Read the source code.""" |