mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
avoid logging color codes
This commit is contained in:
parent
4f93b17c54
commit
dc6f0c1290
1 changed files with 2 additions and 1 deletions
|
@ -111,6 +111,7 @@ class Display:
|
||||||
|
|
||||||
# FIXME: this needs to be implemented
|
# FIXME: this needs to be implemented
|
||||||
#msg = utils.sanitize_output(msg)
|
#msg = utils.sanitize_output(msg)
|
||||||
|
nocolor = msg
|
||||||
if color:
|
if color:
|
||||||
msg = stringc(msg, color)
|
msg = stringc(msg, color)
|
||||||
|
|
||||||
|
@ -135,7 +136,7 @@ class Display:
|
||||||
sys.stderr.flush()
|
sys.stderr.flush()
|
||||||
|
|
||||||
if logger and not screen_only:
|
if logger and not screen_only:
|
||||||
msg2 = msg.lstrip(u'\n')
|
msg2 = nocolor.lstrip(u'\n')
|
||||||
|
|
||||||
msg2 = to_bytes(msg2)
|
msg2 = to_bytes(msg2)
|
||||||
if sys.version_info >= (3,):
|
if sys.version_info >= (3,):
|
||||||
|
|
Loading…
Reference in a new issue