mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 08:13:13 +02:00
plugin_err must always be a string
This commit is contained in:
parent
fe40196c06
commit
191ce078e7
2 changed files with 2 additions and 2 deletions
|
|
@ -316,7 +316,7 @@ def __contains__(self, name):
|
|||
def __getitem__(self, name):
|
||||
from importlib import import_module
|
||||
try:
|
||||
return import_module('calibre_extensions.' + name), None
|
||||
return import_module('calibre_extensions.' + name), ''
|
||||
except ModuleNotFoundError:
|
||||
raise KeyError('No plugin named %r'%name)
|
||||
except Exception as err:
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ def test_plugins(self):
|
|||
ctypes.CDLL(os.path.join(plugins_loc, name + ('.dylib' if ismacos else '.so')))
|
||||
continue
|
||||
mod, err = plugins[name]
|
||||
self.assertFalse(err or not mod, 'Failed to load plugin: ' + name + ' with error:\n' + err)
|
||||
self.assertTrue(mod, f'Failed to load plugin: {name} with error: {err}')
|
||||
|
||||
def test_lxml(self):
|
||||
from calibre.utils.cleantext import test_clean_xml_chars
|
||||
|
|
|
|||
Loading…
Reference in a new issue