Fix a regression in calibre 5 that broke using a file for the --extra-css option of ebook-convert

More python 3 goodness
This commit is contained in:
Kovid Goyal 2022-12-27 08:40:25 +05:30
parent 8e38105c5a
commit c544efa75a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1199,7 +1199,7 @@ OptionRecommendation(name='search_replace',
if self.opts.extra_css and os.path.exists(self.opts.extra_css): if self.opts.extra_css and os.path.exists(self.opts.extra_css):
with open(self.opts.extra_css, 'rb') as f: with open(self.opts.extra_css, 'rb') as f:
self.opts.extra_css = f.read() self.opts.extra_css = f.read().decode('utf-8')
oibl = self.opts.insert_blank_line oibl = self.opts.insert_blank_line
orps = self.opts.remove_paragraph_spacing orps = self.opts.remove_paragraph_spacing