mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1882316 [Check library database failure](https://bugs.launchpad.net/calibre/+bug/1882316)
This commit is contained in:
parent
4d2a91ecf2
commit
7c06692233
@ -246,9 +246,10 @@ class GuiLibraryBroker(LibraryBroker):
|
||||
for library_id in tuple(self.loaded_dbs):
|
||||
if library_id != self.gui_library_id and now - self.last_used_times[
|
||||
library_id] > EXPIRED_AGE:
|
||||
db = self.loaded_dbs.pop(library_id)
|
||||
db.close()
|
||||
db.break_cycles()
|
||||
db = self.loaded_dbs.pop(library_id, None)
|
||||
if db is not None:
|
||||
db.close()
|
||||
db.break_cycles()
|
||||
|
||||
def prune_loaded_dbs(self):
|
||||
with self:
|
||||
|
Loading…
x
Reference in New Issue
Block a user