mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
...
This commit is contained in:
parent
f40f41a889
commit
644e5fe449
@ -1,4 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
'''
|
'''
|
||||||
descopera.org
|
descopera.org
|
||||||
'''
|
'''
|
||||||
|
@ -79,7 +79,12 @@ def serialize_builtin_recipes():
|
|||||||
from calibre.web.feeds.recipes import compile_recipe
|
from calibre.web.feeds.recipes import compile_recipe
|
||||||
recipe_mapping = {}
|
recipe_mapping = {}
|
||||||
for rid, f in iterate_over_builtin_recipe_files():
|
for rid, f in iterate_over_builtin_recipe_files():
|
||||||
recipe_class = compile_recipe(open(f, 'rb').read())
|
with open(f, 'rb') as stream:
|
||||||
|
try:
|
||||||
|
recipe_class = compile_recipe(stream.read())
|
||||||
|
except:
|
||||||
|
print ('Failed to compile: %s'%f)
|
||||||
|
raise
|
||||||
if recipe_class is not None:
|
if recipe_class is not None:
|
||||||
recipe_mapping['builtin:'+rid] = recipe_class
|
recipe_mapping['builtin:'+rid] = recipe_class
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user