mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix #896864 (installer crash in resources area)
This commit is contained in:
parent
521111ba66
commit
686b061b85
@ -13,7 +13,7 @@ from datetime import timedelta
|
|||||||
from lxml import etree
|
from lxml import etree
|
||||||
from lxml.builder import ElementMaker
|
from lxml.builder import ElementMaker
|
||||||
|
|
||||||
from calibre import browser
|
from calibre import browser, force_unicode
|
||||||
from calibre.utils.date import parse_date, now as nowf, utcnow, tzlocal, \
|
from calibre.utils.date import parse_date, now as nowf, utcnow, tzlocal, \
|
||||||
isoformat, fromordinal
|
isoformat, fromordinal
|
||||||
|
|
||||||
@ -66,8 +66,9 @@ def serialize_collection(mapping_of_recipe_classes):
|
|||||||
x.title.decode('ascii')
|
x.title.decode('ascii')
|
||||||
'''
|
'''
|
||||||
for urn in sorted(mapping_of_recipe_classes.keys(),
|
for urn in sorted(mapping_of_recipe_classes.keys(),
|
||||||
key=lambda key: getattr(mapping_of_recipe_classes[key], 'title',
|
key=lambda key: force_unicode(
|
||||||
'zzz')):
|
getattr(mapping_of_recipe_classes[key], 'title', 'zzz'),
|
||||||
|
'utf-8')):
|
||||||
recipe = serialize_recipe(urn, mapping_of_recipe_classes[urn])
|
recipe = serialize_recipe(urn, mapping_of_recipe_classes[urn])
|
||||||
collection.append(recipe)
|
collection.append(recipe)
|
||||||
collection.set('count', str(len(collection)))
|
collection.set('count', str(len(collection)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user