Fixes for manual generation failures

This commit is contained in:
Kovid Goyal 2018-01-05 10:34:41 +05:30
parent 47218173c0
commit cc368c05ca
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 3 deletions

View File

@ -211,8 +211,8 @@ class Source(Plugin):
#: Set this to True if your plugin returns HTML formatted comments
has_html_comments = False
#: Setting this to True means that the browser object will add
#: Accept-Encoding: gzip to all requests. This can speedup downloads
#: Setting this to True means that the browser object will indicate
#: that it supports gzip transfer encoding. This can speedup downloads
#: but make sure that the source actually supports gzip transfer encoding
#: correctly first
supports_gzip_transfer_encoding = False

View File

@ -156,7 +156,10 @@ class OptionSet(object):
if opt.help:
opt.help = t(opt.help)
if opt.name == 'use_primary_find_in_search':
opt.help = opt.help.format(u'ñ')
h = opt.help
if isinstance(h, bytes):
h = h.decode('utf-8', 'replace')
opt.help = h.format(u'ñ')
def option_parser(self, user_defaults=None, usage='', gui_mode=False):
from calibre.utils.config import OptionParser