From dbdf7e91b2fafe31d9581a5248143658c31a6128 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 6 Nov 2014 13:03:29 +0530 Subject: [PATCH] Extra robustness --- src/calibre/gui2/library/models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/library/models.py b/src/calibre/gui2/library/models.py index cf7afd2481..45d7cfdfdc 100644 --- a/src/calibre/gui2/library/models.py +++ b/src/calibre/gui2/library/models.py @@ -1576,8 +1576,10 @@ class DeviceBooksModel(BooksModel): # {{{ return (_('Waiting for metadata to be updated')) if self.is_row_marked_for_deletion(row): return (_('Marked for deletion')) - if cname in ['title', 'authors'] or (cname == 'collections' and - self.db.supports_collections()): + if cname in ['title', 'authors'] or ( + cname == 'collections' and ( + callable(getattr(self.db, 'supports_collections', None)) and self.db.supports_collections()) + ): return (_("Double click to edit me

")) elif role == Qt.DecorationRole and cname == 'inlibrary': if hasattr(self.db[self.map[row]], 'in_library_waiting'):