[Python-bugs-list] [ python-Bugs-497839 ] reindent chokes on empty first lines
noreply@sourceforge.net
noreply@sourceforge.net
Sun, 30 Dec 2001 04:04:20 -0800
Bugs item #497839, was opened at 2001-12-30 04:04
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=497839&group_id=5470
Category: Demos and Tools
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Martin v. Löwis (loewis)
Assigned to: Tim Peters (tim_one)
Summary: reindent chokes on empty first lines
Initial Comment:
If a file has an empty first line, and a hanging
comment, reindent crashes. For the attached file, I get
Traceback (most recent call last):
File "/usr/src/python/Tools/scripts/reindent.py",
line 271, in ?
main()
File "/usr/src/python/Tools/scripts/reindent.py",
line 65, in main
check(arg)
File "/usr/src/python/Tools/scripts/reindent.py",
line 90, in check
if r.run():
File "/usr/src/python/Tools/scripts/reindent.py",
line 187, in run
want = have + getlspace(after[jline-1]) - \
IndexError: list index out of range
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=497839&group_id=5470