We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 17d6f65 commit e8f67c9Copy full SHA for e8f67c9
src/robot/parsing/lexerwrapper.py
@@ -25,14 +25,14 @@ class LexerWrapper(object):
25
def __init__(self, lexer, source):
26
self.source = source
27
self.curdir = os.path.dirname(source).replace('\\', '\\\\')
28
- lexer.input(Utf8Reader(self._open(source)).read())
+ lexer.input(self._read(source))
29
self.tokens = lexer.get_tokens()
30
31
- def _open(self, path):
+ def _read(self, path):
32
try:
33
# IronPython handles BOM incorrectly if not using binary mode:
34
# https://ironpython.codeplex.com/workitem/34655
35
- return open(path, 'rb')
+ return Utf8Reader(open(path, 'rb')).read()
36
except:
37
raise DataError(get_error_message())
38
0 commit comments