mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Alias fileobj.
This commit is contained in:
parent
171c925966
commit
951c8a5d27
1 changed files with 5 additions and 4 deletions
|
@ -129,11 +129,12 @@ class Display:
|
|||
msg2 = to_unicode(msg2, self._output_encoding(stderr=stderr))
|
||||
|
||||
if not stderr:
|
||||
sys.stdout.write(msg2)
|
||||
sys.stdout.flush()
|
||||
fileobj = sys.stdout
|
||||
else:
|
||||
sys.stderr.write(msg2)
|
||||
sys.stderr.flush()
|
||||
fileobj = sys.stderr
|
||||
|
||||
fileobj.write(msg2)
|
||||
fileobj.flush()
|
||||
|
||||
if logger and not screen_only:
|
||||
msg2 = nocolor.lstrip(u'\n')
|
||||
|
|
Loading…
Reference in a new issue