Avoid IndexError with empty source dir

This commit is contained in:
Jean Raby
2023-09-06 21:13:05 -04:00
parent c15d543fd0
commit b8815bd8cf

View File

@@ -207,7 +207,7 @@ def build(
opt = " ({})".format(", ".join(opt)) if opt else ""
return f"{stats[_type]} {_type}s{opt}"
if not quiet:
if not quiet and len(stats) > 0:
stats_str = ""
types = sorted({t.rsplit("_", 1)[0] for t in stats})
for t in types[:-1]: