diff --git a/doc/scripts/gen-nodetool-docs.py b/doc/scripts/gen-nodetool-docs.py index efb79cf7a4..d27e213b42 100644 --- a/doc/scripts/gen-nodetool-docs.py +++ b/doc/scripts/gen-nodetool-docs.py @@ -47,8 +47,10 @@ def batched(iterable, n): if n < 1: raise ValueError('n must be at least one') it = iter(iterable) - while (batch := tuple(islice(it, n))): + batch = tuple(islice(it, n)) + while (batch): yield batch + batch = tuple(islice(it, n)) # create the documentation directory if not os.path.exists(outdir):