mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix a problem with the validation formatter causing problems in the Kobo driver.
This commit is contained in:
parent
65e54cb478
commit
e8d46b6094
@ -2033,9 +2033,9 @@ class ValidateFormatter(TemplateFormatter):
|
||||
def get_value(self, key, args, kwargs):
|
||||
return self._validation_string
|
||||
|
||||
def validate(self, x):
|
||||
def validate(self, template):
|
||||
from calibre.ebooks.metadata.book.base import Metadata
|
||||
return self.unsafe_format(x, {}, 'VALIDATE ERROR', Metadata(''))
|
||||
return self.unsafe_format(template, {}, Metadata(''))
|
||||
|
||||
|
||||
validation_formatter = ValidateFormatter()
|
||||
|
@ -193,7 +193,10 @@ def only_in_gui_error(name):
|
||||
|
||||
|
||||
def get_database(mi, name):
|
||||
proxy = mi.get('_proxy_metadata', None)
|
||||
try:
|
||||
proxy = mi.get('_proxy_metadata', None)
|
||||
except Exception:
|
||||
proxy = None
|
||||
if proxy is None:
|
||||
if name is not None:
|
||||
only_in_gui_error(name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user