summaryrefslogtreecommitdiff
path: root/Lib/uu.py
diff options
context:
space:
mode:
authorlarryhastings <larry@hastings.org>2020-06-12 06:07:07 -0400
committerGitHub <noreply@github.com>2020-06-12 06:07:07 -0400
commitb4c34b56aa4da179e5cd1ce9e58ba832db1cda64 (patch)
tree49296e3e222a3bc8f7a90939c177c8c3bd881f93 /Lib/uu.py
parent3ffaa5e3d0f82f3f7571ad12bb9f07364875409b (diff)
parent55a6a16a46239a71b635584e532feb8b17ae7fdf (diff)
downloadcpython-git-travis-3.5.tar.gz
Merge branch '3.5' into travis-3.5travis-3.5
Diffstat (limited to 'Lib/uu.py')
-rwxr-xr-xLib/uu.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/uu.py b/Lib/uu.py
index d68d29374a..3a8c31cff0 100755
--- a/Lib/uu.py
+++ b/Lib/uu.py
@@ -73,6 +73,13 @@ def encode(in_file, out_file, name=None, mode=None):
name = '-'
if mode is None:
mode = 0o666
+
+ #
+ # Remove newline chars from name
+ #
+ name = name.replace('\n','\\n')
+ name = name.replace('\r','\\r')
+
#
# Write the data
#