diff options
author | Jan Stürtz <js@contact.de> | 2014-11-28 08:47:08 -0500 |
---|---|---|
committer | Phil Frost <indigo@bitglue.com> | 2014-11-28 10:58:05 -0500 |
commit | 8f47ab1887399f6df0a9173efa8ffb87447140bb (patch) | |
tree | 4aabf782040fa504ac23b5d05a292db77579976c | |
parent | 9a0b6508b93620edb2a8648e3f7c91925439e169 (diff) | |
download | pyflakes-8f47ab1887399f6df0a9173efa8ffb87447140bb.tar.gz |
Open files not in binary mode for Windows
On Windows with python 2.6 pyflakes 0.8.1 fails to process files with DOS line
endings (\r\n).
-rw-r--r-- | pyflakes/api.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pyflakes/api.py b/pyflakes/api.py index e8647f9..3f3899a 100644 --- a/pyflakes/api.py +++ b/pyflakes/api.py @@ -73,7 +73,7 @@ def checkPath(filename, reporter=None): if reporter is None: reporter = modReporter._makeDefaultReporter() try: - with open(filename, 'rb') as f: + with open(filename, 'r') as f: codestr = f.read() if sys.version_info < (2, 7): codestr += '\n' # Work around for Python <= 2.6 |