Skip to content

Commit a2f121d

Browse files
authored
Merge pull request #5211 from grondo/issue#5209
flux-jobs: reduce likelihood of leaving bad terminal color state on empty output
2 parents c2964c9 + 72c40f4 commit a2f121d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bindings/python/flux/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -696,11 +696,11 @@ def print_items(self, items, no_header=False, pre=None, post=None):
696696
if not no_header:
697697
print(formatter.header())
698698
for item in items:
699-
if callable(pre):
700-
pre(item)
701699
line = formatter.format(item)
702700
if not line:
703701
continue
702+
if callable(pre):
703+
pre(item)
704704
try:
705705
print(line)
706706
except UnicodeEncodeError:

0 commit comments

Comments
 (0)