Browse Source

fix crash when building songbook without songs

remotes/origin/HEAD
spalax 12 years ago
committed by Romain Goffe
parent
commit
9813e231ff
  1. 3
      songbook-makeindex.py

3
songbook-makeindex.py

@ -85,10 +85,13 @@ def processSXD(filename):
type = data[0] type = data[0]
i = 1 i = 1
idx = index() idx = index()
if len(data) > 1:
while data[i].startswith('%'): while data[i].startswith('%'):
keywords = keywordPattern.match(data[i]).groups() keywords = keywordPattern.match(data[i]).groups()
idx.keyword(keywords[0],keywords[1]) idx.keyword(keywords[0],keywords[1])
i += 1 i += 1
idx.compileKeywords() idx.compileKeywords()
for i in range(i,len(data),3): for i in range(i,len(data),3):
entry = processSXDEntry(data[i:i+3]) entry = processSXDEntry(data[i:i+3])

Loading…
Cancel
Save