summaryrefslogtreecommitdiff
path: root/logilab/common/fileutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'logilab/common/fileutils.py')
-rw-r--r--logilab/common/fileutils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/logilab/common/fileutils.py b/logilab/common/fileutils.py
index 366d23d..48828fb 100644
--- a/logilab/common/fileutils.py
+++ b/logilab/common/fileutils.py
@@ -28,6 +28,7 @@ from __future__ import print_function
__docformat__ = "restructuredtext en"
+import io
import sys
import shutil
import mimetypes
@@ -282,7 +283,7 @@ def lines(path, comments=None):
:warning: at some point this function will probably return an iterator
"""
- stream = open(path, 'U')
+ stream = io.open(path)
result = stream_lines(stream, comments)
stream.close()
return result