mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Make the validation formatter work with "program:"-style templates.
This commit is contained in:
parent
3ca574fa32
commit
a1d38c75f0
@ -545,8 +545,7 @@ class ValidateFormatter(TemplateFormatter):
|
||||
|
||||
def validate(self, x):
|
||||
from calibre.ebooks.metadata.book.base import Metadata
|
||||
self.book = Metadata('')
|
||||
return self.vformat(x, [], {})
|
||||
return self.safe_format(x, {}, 'VALIDATE ERROR', Metadata(''))
|
||||
|
||||
|
||||
validation_formatter = ValidateFormatter()
|
||||
|
Loading…
x
Reference in New Issue
Block a user