mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -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…
x
Reference in New Issue
Block a user