summaryrefslogtreecommitdiff
path: root/Lib/lib2to3/refactor.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib2to3/refactor.py')
-rw-r--r--Lib/lib2to3/refactor.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/lib2to3/refactor.py b/Lib/lib2to3/refactor.py
index db2e38d22f..7c4e064997 100644
--- a/Lib/lib2to3/refactor.py
+++ b/Lib/lib2to3/refactor.py
@@ -314,7 +314,7 @@ class RefactoringTool(object):
encoding = tokenize.detect_encoding(f.readline)[0]
finally:
f.close()
- with io.open(filename, "r", encoding=encoding) as f:
+ with io.open(filename, "r", encoding=encoding, newline='') as f:
return f.read(), encoding
def refactor_file(self, filename, write=False, doctests_only=False):