drop unused write_to_stdout function
this was added after 1.16 and no longer used, so no point in keeping it
This commit is contained in:
parent
b4b6e2e6cc
commit
a55ea5c2d6
1 changed files with 0 additions and 16 deletions
|
|
@ -343,22 +343,6 @@ Running Tasks:
|
|||
return rv
|
||||
|
||||
|
||||
def write_to_stdout(contents):
|
||||
"""Helper function to write str/bytes to stdout
|
||||
|
||||
https://docs.python.org/3/library/sys.html#sys.displayhook
|
||||
"""
|
||||
try:
|
||||
sys.stdout.write(contents)
|
||||
except UnicodeEncodeError:
|
||||
bytes = contents.encode(sys.stdout.encoding, 'backslashreplace')
|
||||
if hasattr(sys.stdout, 'buffer'):
|
||||
sys.stdout.buffer.write(bytes)
|
||||
else:
|
||||
contents = bytes.decode(sys.stdout.encoding, 'strict')
|
||||
sys.stdout.write(contents)
|
||||
|
||||
|
||||
def bytes_to_stdout(contents):
|
||||
"""Helper function for writing bytes to stdout"""
|
||||
if six.PY2:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue