\r does not round-trip the local socket, escape and restore on the other side (#43507)

This commit is contained in:
Nathaniel Case
2018-08-01 08:44:39 -04:00
committed by GitHub
parent c4591f0861
commit 9169daa326
2 changed files with 4 additions and 0 deletions

View File

@@ -214,6 +214,8 @@ def main():
raise Exception("EOF found before vars data was complete")
vars_data += cur_line
cur_line = stdin.readline()
# restore escaped loose \r characters
vars_data = vars_data.replace(br'\r', b'\r')
if PY3:
pc_data = cPickle.loads(init_data, encoding='bytes')