mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -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 = '\n'.join(doc)
|
||||
while True:
|
||||
line = lines[pos]
|
||||
try:
|
||||
line = lines[pos]
|
||||
except IndexError:
|
||||
break
|
||||
if not line.strip():
|
||||
break
|
||||
spidx1 = line.find(' ')
|
||||
|
Loading…
x
Reference in New Issue
Block a user