Issue #19426: Fixed the opening of Python source file with specified encoding.
This commit is contained in:
parent
712e951f54
commit
1c760cab1d
|
@ -125,7 +125,7 @@ def coding_spec(str):
|
|||
Raise LookupError if the encoding is declared but unknown.
|
||||
"""
|
||||
# Only consider the first two lines
|
||||
str = str.split("\n", 2)[:2]
|
||||
lst = str.split("\n", 2)[:2]
|
||||
for line in lst:
|
||||
match = coding_re.match(line)
|
||||
if match is not None:
|
||||
|
|
Loading…
Reference in New Issue