mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -172,7 +172,10 @@ class Tweaks(QAbstractListModel, SearchQueryParser): # {{{
|
|||||||
doc.append(line[1:].strip())
|
doc.append(line[1:].strip())
|
||||||
doc = '\n'.join(doc)
|
doc = '\n'.join(doc)
|
||||||
while True:
|
while True:
|
||||||
line = lines[pos]
|
try:
|
||||||
|
line = lines[pos]
|
||||||
|
except IndexError:
|
||||||
|
break
|
||||||
if not line.strip():
|
if not line.strip():
|
||||||
break
|
break
|
||||||
spidx1 = line.find(' ')
|
spidx1 = line.find(' ')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user