mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 10:13:15 +02:00
Do not fail to load tweaks when the file does not end with a newline
This commit is contained in:
parent
2d7e19d36d
commit
2ce41e6b27
1 changed files with 4 additions and 1 deletions
|
|
@ -172,7 +172,10 @@ def read_tweak(self, lines, pos, defaults, custom):
|
|||
doc.append(line[1:].strip())
|
||||
doc = '\n'.join(doc)
|
||||
while True:
|
||||
line = lines[pos]
|
||||
try:
|
||||
line = lines[pos]
|
||||
except IndexError:
|
||||
break
|
||||
if not line.strip():
|
||||
break
|
||||
spidx1 = line.find(' ')
|
||||
|
|
|
|||
Loading…
Reference in a new issue