Ignore importerror during interpreter shutdown while closing db

This commit is contained in:
Kovid Goyal 2022-08-06 09:42:36 +05:30
parent 1c8049eb21
commit 7f6f53149d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -2461,7 +2461,11 @@ class Cache:
self.shutting_down = True
self.event_dispatcher.close()
self._shutdown_fts()
try:
from calibre.customize.ui import available_library_closed_plugins
except ImportError:
pass # happens during interpreter shutdown
else:
for plugin in available_library_closed_plugins():
try:
plugin.run(self)