Skip to content

Commit a4af998

Browse files
committed
Refactor: cts: Unindent a block in the Scenario class.
There's probably almost endless amounts of this that could be done in CTS, and I don't really want to get started on that but I was already in the area.
1 parent d3237a1 commit a4af998

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

python/pacemaker/_cts/scenarios.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -302,19 +302,20 @@ def audit(self, local_ignore=None):
302302
if self._bad_news:
303303
match = self._bad_news.look(0)
304304

305-
if match:
306-
add_err = True
305+
if not match:
306+
break
307307

308-
for ignore in ignorelist:
309-
if add_err and re.search(ignore, match):
310-
add_err = False
308+
add_err = True
311309

312-
if add_err:
313-
self._cm.log(f"BadNews: {match}")
314-
self.incr("BadNews")
315-
errcount += 1
316-
else:
317-
break
310+
for ignore in ignorelist:
311+
if add_err and re.search(ignore, match):
312+
add_err = False
313+
break
314+
315+
if add_err:
316+
self._cm.log(f"BadNews: {match}")
317+
self.incr("BadNews")
318+
errcount += 1
318319
else:
319320
print("Big problems")
320321
if not should_continue(self._cm.env):

0 commit comments

Comments
 (0)