Merge pull request #498 from jraby/IndexError-on-empty-source-dir

Avoid IndexError with empty source dir
This commit is contained in:
Simon Conseil
2023-09-07 08:38:29 +02:00
committed by GitHub

View File

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