Skip to content

Commit

Permalink
GH-2172 Use not instead of len
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Feb 5, 2024
1 parent 974c59b commit 15236d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/TestHarness/Cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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, '
Expand Down

0 comments on commit 15236d0

Please sign in to comment.