mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Ignore importerror during interpreter shutdown while closing db
This commit is contained in:
parent
1c8049eb21
commit
7f6f53149d
@ -2461,13 +2461,17 @@ class Cache:
|
|||||||
self.shutting_down = True
|
self.shutting_down = True
|
||||||
self.event_dispatcher.close()
|
self.event_dispatcher.close()
|
||||||
self._shutdown_fts()
|
self._shutdown_fts()
|
||||||
from calibre.customize.ui import available_library_closed_plugins
|
try:
|
||||||
for plugin in available_library_closed_plugins():
|
from calibre.customize.ui import available_library_closed_plugins
|
||||||
try:
|
except ImportError:
|
||||||
plugin.run(self)
|
pass # happens during interpreter shutdown
|
||||||
except Exception:
|
else:
|
||||||
import traceback
|
for plugin in available_library_closed_plugins():
|
||||||
traceback.print_exc()
|
try:
|
||||||
|
plugin.run(self)
|
||||||
|
except Exception:
|
||||||
|
import traceback
|
||||||
|
traceback.print_exc()
|
||||||
self._shutdown_fts(stage=2)
|
self._shutdown_fts(stage=2)
|
||||||
with self.write_lock:
|
with self.write_lock:
|
||||||
self.backend.close()
|
self.backend.close()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user