fnp
/
librarian.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change default cover.
[librarian.git]
/
src
/
librarian
/
covers
/
utils
/
textbox.py
diff --git
a/src/librarian/covers/utils/textbox.py
b/src/librarian/covers/utils/textbox.py
index
a5097ed
..
cc9c501
100644
(file)
--- a/
src/librarian/covers/utils/textbox.py
+++ b/
src/librarian/covers/utils/textbox.py
@@
-80,6
+80,8
@@
class TextBox:
def find_grouping(self, groups, ngroups, glue):
best = None
best_var = None
def find_grouping(self, groups, ngroups, glue):
best = None
best_var = None
+ if not groups:
+ return []
mean = sum(g[0] for g in groups) + (len(groups) - ngroups) * glue
if mean > self.width * ngroups:
mean = sum(g[0] for g in groups) + (len(groups) - ngroups) * glue
if mean > self.width * ngroups: