mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
SONY driver: Fix bug when adding records to empty cacheExt.xml
This commit is contained in:
parent
330a7c989b
commit
7988560d75
@ -573,7 +573,10 @@ class XMLCache(object):
|
||||
ans = root.makeelement('{%s}text'%namespace, attrib=attrib,
|
||||
nsmap=root.nsmap)
|
||||
ans.tail = '\n'
|
||||
root[-1].tail = '\n' + '\t'
|
||||
if len(root) > 0:
|
||||
root[-1].tail = '\n\t'
|
||||
else:
|
||||
root.text = '\n\t'
|
||||
root.append(ans)
|
||||
if thumbnail and thumbnail[-1]:
|
||||
ans.text = '\n' + '\t\t'
|
||||
|
Loading…
x
Reference in New Issue
Block a user