mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-28 21:55:58 +01:00
Fix #1882316 [Check library database failure](https://bugs.launchpad.net/calibre/+bug/1882316)
This commit is contained in:
parent
4d2a91ecf2
commit
7c06692233
1 changed files with 4 additions and 3 deletions
|
|
@ -246,9 +246,10 @@ def _prune_loaded_dbs(self):
|
|||
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…
Reference in a new issue