mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
py3: etree.tostring emits bytes, and must be written using binary mode
This commit is contained in:
parent
d78e4807c3
commit
8078bf0931
@ -235,6 +235,6 @@ class CSV_XML(CatalogPlugin):
|
||||
if 'library_name' in fields:
|
||||
record.append(E.library_name(current_library))
|
||||
|
||||
with open(path_to_output, 'w') as f:
|
||||
with open(path_to_output, 'wb') as f:
|
||||
f.write(etree.tostring(root, encoding='utf-8',
|
||||
xml_declaration=True, pretty_print=True))
|
||||
|
Loading…
x
Reference in New Issue
Block a user