From 4fcb4fc42e125ab09e76114d215bab2d4c76affe Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Sun, 27 Feb 2011 20:36:45 +0000 Subject: [PATCH] Ignore errors when setting preferences in clean_user_categories --- src/calibre/library/database2.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/library/database2.py b/src/calibre/library/database2.py index bf3e9c8a14..4d6681b91d 100644 --- a/src/calibre/library/database2.py +++ b/src/calibre/library/database2.py @@ -1195,7 +1195,10 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns): i += 1 else: new_cats['.'.join(comps)] = user_cats[k] - self.prefs.set('user_categories', new_cats) + try: + self.prefs.set('user_categories', new_cats) + except: + pass return new_cats def get_categories(self, sort='name', ids=None, icon_map=None):