Fix past end of string bug in Python first line hack.
This commit is contained in:
parent
ef8a7b1703
commit
2dd673e4d3
|
@ -11,7 +11,7 @@ def process(inf):
|
||||||
for line in inf:
|
for line in inf:
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
start = line[:2]
|
start = line[:2]
|
||||||
if start[0] != "|" and start[1] == ":":
|
if len(start) > 1 and start[0] != "|" and start[1] == ":":
|
||||||
if start[0] in ["M", "K", "L"]:
|
if start[0] in ["M", "K", "L"]:
|
||||||
print line
|
print line
|
||||||
elif start[0] != "%":
|
elif start[0] != "%":
|
||||||
|
|
Loading…
Reference in New Issue