From 318de321f133b5547cbdee54ded6c50890155c04 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 21 Jul 2008 13:40:25 -0700 Subject: [PATCH] IGN:fixes to lit2oeb --- src/calibre/ebooks/lit/reader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/lit/reader.py b/src/calibre/ebooks/lit/reader.py index c83342dc40..2850b05a2b 100644 --- a/src/calibre/ebooks/lit/reader.py +++ b/src/calibre/ebooks/lit/reader.py @@ -757,12 +757,12 @@ class LitReader(object): opf_path = 'content.opf' opf_path = os.path.join(output_dir, opf_path) self._ensure_dir(opf_path) - with open(opf_path, 'w') as f: + with open(opf_path, 'wb') as f: f.write(self.meta.encode('utf-8')) for entry in self.manifest.values(): path = os.path.join(output_dir, entry.path) self._ensure_dir(path) - with open(path, 'w') as f: + with open(path, 'wb') as f: if 'spine' in entry.state: name = '/'.join(('/data', entry.internal, 'content')) f.write(self.get_markup_file(name).encode('utf-8'))