From 15236d06ad720142f1f1374d9dbb3b32dc79d8e3 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Mon, 5 Feb 2024 06:29:55 -0600 Subject: [PATCH] GH-2172 Use not instead of len --- tests/TestHarness/Cluster.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/TestHarness/Cluster.py b/tests/TestHarness/Cluster.py index e139ca0d19..22412a800e 100644 --- a/tests/TestHarness/Cluster.py +++ b/tests/TestHarness/Cluster.py @@ -999,9 +999,9 @@ def activateInstantFinality(self, launcher, biosFinalizer, pnodes): # call setfinalizer numFins = 0 for n in launcher.network.nodes.values(): - if len(n.keys) == 0 or n.keys[0].blspubkey is None: + if not n.keys or not n.keys[0].blspubkey: continue - if len(n.producers) == 0: + if not n.producers: continue if n.index == Node.biosNodeId and not biosFinalizer: continue @@ -1020,9 +1020,9 @@ def activateInstantFinality(self, launcher, biosFinalizer, pnodes): for n in launcher.network.nodes.values(): if n.index == Node.biosNodeId and not biosFinalizer: continue - if len(n.keys) == 0 or n.keys[0].blspubkey is None: + if not n.keys or not n.keys[0].blspubkey: continue - if len(n.producers) == 0: + if not n.producers: continue setFinStr += f' {{"description": "finalizer #{finNum}", ' setFinStr += f' "weight":1, '