mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-01 00:23:16 +02:00
Dont allow a failure to exec() downloaded metadata source plugins to prevent metadata download from working
This commit is contained in:
parent
3766f43360
commit
90ee3a5987
1 changed files with 6 additions and 2 deletions
|
|
@ -59,8 +59,12 @@ def patch_search_engines(src):
|
|||
global current_search_engines
|
||||
src = src.encode('utf-8')
|
||||
ns = {}
|
||||
exec(src, ns)
|
||||
mcv = ns.get('minimum_calibre_version')
|
||||
try:
|
||||
exec(src, ns)
|
||||
except Exception:
|
||||
mcv = None
|
||||
else:
|
||||
mcv = ns.get('minimum_calibre_version')
|
||||
if mcv is None or mcv > numeric_version:
|
||||
return
|
||||
cv = ns.get('current_version')
|
||||
|
|
|
|||
Loading…
Reference in a new issue