Small mistake when opening a file

This commit is contained in:
Dave Halter
2018-01-20 20:30:44 +01:00
parent 1476551257
commit 9c0b344962

View File

@@ -363,7 +363,7 @@ class Evaluator(object):
def parse_and_get_code(self, code, path, **kwargs):
if self.allow_different_encoding:
if code is None:
with open('rb') as f:
with open(path, 'rb') as f:
code = f.read()
code = python_bytes_to_unicode(code, errors='replace')