Add support for predesigned covers to Marquise. Remove support for changing cover...
[librarian.git] / src / librarian / covers / utils / textbox.py
index a5097ed..cc9c501 100644 (file)
@@ -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: