Mercurial > dottes
changeset 54:00a1bef43a34
Fix past end of string bug in Python first line hack.
author | Jim Hague <jim.hague@laicatc.com> |
---|---|
date | Sun, 04 Mar 2012 21:44:31 +0000 |
parents | c47bd41e9840 |
children | 5e3043434cdf |
files | abcfirstline.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/abcfirstline.py Sun Mar 04 21:06:05 2012 +0000 +++ b/abcfirstline.py Sun Mar 04 21:44:31 2012 +0000 @@ -11,7 +11,7 @@ for line in inf: line = line.strip() 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"]: print line elif start[0] != "%":