mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-17 22:49:08 -07:00
Ensure we end with a newline in normal mode
This commit is contained in:
parent
7148023f59
commit
221a4e7014
1 changed files with 10 additions and 9 deletions
|
@ -35,9 +35,9 @@ import sys
|
||||||
#
|
#
|
||||||
# + On screen there should only be relevant stuff
|
# + On screen there should only be relevant stuff
|
||||||
# - How far are we ? (during run, last line)
|
# - How far are we ? (during run, last line)
|
||||||
# - What issues did we have
|
# - What issues occurred
|
||||||
# - What changes have occured
|
# - What changes occurred
|
||||||
# - Diff output
|
# - Diff output (in diff-mode)
|
||||||
#
|
#
|
||||||
# + If verbosity increases, act as default output
|
# + If verbosity increases, act as default output
|
||||||
# So that users can easily switch to default for troubleshooting
|
# So that users can easily switch to default for troubleshooting
|
||||||
|
@ -424,15 +424,16 @@ class CallbackModule_dense(CallbackModule_default):
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
def v2_playbook_on_stats(self, stats):
|
def v2_playbook_on_stats(self, stats):
|
||||||
# In normal mode screen output should be sufficient
|
if self.keep:
|
||||||
|
sys.stdout.write(ansi.restore + '\n' + ansi.save + ansi.reset + ansi.clearline)
|
||||||
|
else:
|
||||||
|
sys.stdout.write(ansi.restore + ansi.reset + ansi.clearline)
|
||||||
|
|
||||||
|
# In normal mode screen output should be sufficient, summary is redundant
|
||||||
if self._display.verbosity == 0:
|
if self._display.verbosity == 0:
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.keep:
|
sys.stdout.write(ansi.bold + ansi.underline)
|
||||||
sys.stdout.write(ansi.restore + '\n' + ansi.save + ansi.clearline + ansi.bold)
|
|
||||||
else:
|
|
||||||
sys.stdout.write(ansi.restore + ansi.clearline + ansi.bold)
|
|
||||||
|
|
||||||
sys.stdout.write('SUMMARY')
|
sys.stdout.write('SUMMARY')
|
||||||
|
|
||||||
sys.stdout.write(ansi.restore + '\n' + ansi.save + ansi.reset + ansi.clearline)
|
sys.stdout.write(ansi.restore + '\n' + ansi.save + ansi.reset + ansi.clearline)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue