From 74b0b2086f3a7e838acde21c8020f10f0a47955a Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Mon, 30 Jan 2023 07:46:54 -0600 Subject: [PATCH] remove walrus operator in gen-nodetool-docs.py Patch by brandonwilliams; reviewed by smiklosovic for CASSANDRA-18207 --- doc/scripts/gen-nodetool-docs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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):