From 7c2f6056d6db4a2341e6584cd6f9d0284e2d9ac0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 20 Oct 2013 16:58:18 +0530 Subject: [PATCH] Fix #1242291 [ValueError:min() arg is an empty sequence](https://bugs.launchpad.net/calibre/+bug/1242291) --- src/calibre/gui2/library/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/library/views.py b/src/calibre/gui2/library/views.py index aa20670738..2718b0335e 100644 --- a/src/calibre/gui2/library/views.py +++ b/src/calibre/gui2/library/views.py @@ -700,7 +700,8 @@ class BooksView(QTableView): # {{{ except ValueError: pass sections = tuple(x for x in map(f, changed) if x is not None) - self.row_header.headerDataChanged(Qt.Vertical, min(sections), max(sections)) + if sections: + self.row_header.headerDataChanged(Qt.Vertical, min(sections), max(sections)) else: # Marked items have either appeared or all been removed self.model().set_row_decoration(current_marked)