summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2014-05-26 23:21:08 +0200
committerFlorent Xicluna <florent.xicluna@gmail.com>2014-05-26 23:21:08 +0200
commit8c58f1f5ae1a79c38c3a85992b310a33b8115468 (patch)
tree58725ff12c652c2849e143e77922cca95dccc355
parent2e8e47168d53e2dc11d904eabc3a84e0d43a699c (diff)
parentb2b195efa62d1465b753b7c9bf8e62793f0b6b01 (diff)
downloadpep8-8c58f1f5ae1a79c38c3a85992b310a33b8115468.tar.gz
Merge pull request #288 from dreadatour/universal-newline
Always open files with universal newline flag; issue #288
-rwxr-xr-xpep8.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pep8.py b/pep8.py
index 0d7e294..92042fb 100755
--- a/pep8.py
+++ b/pep8.py
@@ -1037,7 +1037,7 @@ if '' == ''.encode():
# Python 2: implicit encoding.
def readlines(filename):
"""Read the source code."""
- with open(filename) as f:
+ with open(filename, 'rU') as f:
return f.readlines()
isidentifier = re.compile(r'[a-zA-Z_]\w*').match
stdin_get_value = sys.stdin.read