mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
parent
e1b0287c04
commit
069306312a
16 changed files with 36 additions and 115 deletions
|
|
@ -24,12 +24,12 @@ else:
|
|||
|
||||
|
||||
def normalize_output(data):
|
||||
# Some operating systems do conversions on newline. We could possibly
|
||||
# fix that by doing the appropriate termios.tcsetattr()s. I couldn't
|
||||
# figure out the right combo on Tru64 and I don't have an IRIX box.
|
||||
# So just normalize the output and doc the problem O/Ses by allowing
|
||||
# certain combinations for some platforms, but avoid allowing other
|
||||
# differences (like extra whitespace, trailing garbage, etc.)
|
||||
# Some operating systems do conversions on newline. We could possibly fix
|
||||
# that by doing the appropriate termios.tcsetattr()s. I couldn't figure out
|
||||
# the right combo on Tru64. So, just normalize the output and doc the
|
||||
# problem O/Ses by allowing certain combinations for some platforms, but
|
||||
# avoid allowing other differences (like extra whitespace, trailing garbage,
|
||||
# etc.)
|
||||
|
||||
# This is about the best we can do without getting some feedback
|
||||
# from someone more knowledgable.
|
||||
|
|
@ -38,7 +38,6 @@ def normalize_output(data):
|
|||
if data.endswith(b'\r\r\n'):
|
||||
return data.replace(b'\r\r\n', b'\n')
|
||||
|
||||
# IRIX apparently turns \n into \r\n.
|
||||
if data.endswith(b'\r\n'):
|
||||
return data.replace(b'\r\n', b'\n')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue