mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-02-23 19:50:06 -05:00
...
This commit is contained in:
parent
e2ef55140d
commit
b013d2fb5c
@ -30,7 +30,6 @@ def safe_xml_fromstring(string_or_bytes, recover=True):
|
||||
except etree.XMLSyntaxError:
|
||||
# this happens on windows where if string_or_bytes is unicode and
|
||||
# contains non-BMP chars lxml chokes
|
||||
# ebook-convert file.epub .azw3 -m metadata.opf
|
||||
if sys.platform != 'win32' or not isinstance(string_or_bytes, str):
|
||||
raise
|
||||
ans = fs(string_or_bytes.encode('utf-8'), parser=create_parser(True, encoding='utf-8'))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user