Fixes #36146.
parseline() checks that a line has at least 11 whitespace-separated fields:
if len(sline) < 11:
# line too short to be valid, skip it.
return None
but it later reads sline[11] (the user agent), which needs 12. A line with exactly 11 fields got past the check and then raised IndexError, aborting the whole run instead of skipping that line. 11 is the highest index the function uses, so the check now requires 12 fields.
This isn't only theoretical: README.md builds seeds_main.txt by appending one crawler's output onto another's, so the file mixes two independently maintained formats, and a truncated download leaves a short last line too. Skipping the line is what the check was already trying to do.
The first commit adds tests, since nothing covered makeseeds before. They pass on both commits with different expectations: it first records that an 11-field line raises IndexError, and the fix commit replaces that single assertion with the line being skipped. Run with:
python3 -m unittest contrib.seeds.makeseeds