The "if not line[i]" check would cause an IndexError earlier than the exception. Also, report the line number where that happened. (the +2 op. is needed because we skip 1 for header and count at 0) (cherry picked from commit 7f7e84e32405d4552b8f1b156d359d629bbca353) bzr revid: p_christ@hol.gr-20110420152413-knedwepb0tmersw4