1
0
Fork 0
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:
Chris Lamb 2016-03-03 19:16:58 +00:00
parent 171c925966
commit 951c8a5d27

View file

@ -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')