Prevent errors in tweaks.py from preventing calibre startup

This commit is contained in:
Kovid Goyal 2019-05-03 06:44:08 +05:30
parent 28a07b0727
commit 9709efaba9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -637,7 +637,11 @@ def default_tweaks_raw():
def read_tweaks():
default_tweaks = exec_tweaks(default_tweaks_raw())
default_tweaks.update(read_custom_tweaks())
try:
custom_tweaks = read_custom_tweaks()
except Exception:
custom_tweaks = {}
default_tweaks.update(custom_tweaks)
return default_tweaks