From 7d9ca9dda75a03ae6d8b97660e05017193cc8ba3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 24 Sep 2010 10:40:53 -0600 Subject: [PATCH] ... --- src/calibre/library/caches.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/calibre/library/caches.py b/src/calibre/library/caches.py index 339f1393f5..1e52350e46 100644 --- a/src/calibre/library/caches.py +++ b/src/calibre/library/caches.py @@ -97,8 +97,12 @@ class CoverCache(Thread): # {{{ import traceback traceback.print_exc() continue - with self.lock: - self.cache[id_] = img + try: + with self.lock: + self.cache[id_] = img + except: + # Happens during interpreter shutdown + break def set_cache(self, ids): with self.lock: