X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/8495b2ce8e9aebe778db74217b60fb68c0b5f9f2..cef5307b16e8df550c9ecf9704449e55b9137be2:/src/librarian/covers/utils/textbox.py?ds=inline diff --git a/src/librarian/covers/utils/textbox.py b/src/librarian/covers/utils/textbox.py index a5097ed..cc9c501 100644 --- 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 + if not groups: + return [] mean = sum(g[0] for g in groups) + (len(groups) - ngroups) * glue if mean > self.width * ngroups: