mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1136 (Error in .91 Fetch news)
This commit is contained in:
parent
57a3fee974
commit
0de5dbf311
@ -13,7 +13,7 @@ recipes = [
|
|||||||
'daily_telegraph',
|
'daily_telegraph',
|
||||||
]
|
]
|
||||||
|
|
||||||
import re, imp, inspect, time
|
import re, imp, inspect, time, os
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe, CustomIndexRecipe, AutomaticNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe, CustomIndexRecipe, AutomaticNewsRecipe
|
||||||
from calibre.ebooks.lrf.web.profiles import DefaultProfile, FullContentProfile
|
from calibre.ebooks.lrf.web.profiles import DefaultProfile, FullContentProfile
|
||||||
from calibre.ebooks.lrf.web import builtin_profiles
|
from calibre.ebooks.lrf.web import builtin_profiles
|
||||||
@ -56,7 +56,7 @@ def compile_recipe(src):
|
|||||||
@return: Recipe/Profile class or None, if no such class was found in C{src}
|
@return: Recipe/Profile class or None, if no such class was found in C{src}
|
||||||
'''
|
'''
|
||||||
global _tdir, _crep
|
global _tdir, _crep
|
||||||
if _tdir is None:
|
if _tdir is None or not os.path.exists(_tdir):
|
||||||
_tdir = path(PersistentTemporaryDirectory('_recipes'))
|
_tdir = path(PersistentTemporaryDirectory('_recipes'))
|
||||||
temp = _tdir/('recipe%d.py'%_crep)
|
temp = _tdir/('recipe%d.py'%_crep)
|
||||||
_crep += 1
|
_crep += 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user