diff options
author | larryhastings <larry@hastings.org> | 2020-06-12 06:07:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-12 06:07:07 -0400 |
commit | b4c34b56aa4da179e5cd1ce9e58ba832db1cda64 (patch) | |
tree | 49296e3e222a3bc8f7a90939c177c8c3bd881f93 /Lib/encodings/uu_codec.py | |
parent | 3ffaa5e3d0f82f3f7571ad12bb9f07364875409b (diff) | |
parent | 55a6a16a46239a71b635584e532feb8b17ae7fdf (diff) | |
download | cpython-git-travis-3.5.tar.gz |
Merge branch '3.5' into travis-3.5travis-3.5
Diffstat (limited to 'Lib/encodings/uu_codec.py')
-rw-r--r-- | Lib/encodings/uu_codec.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/encodings/uu_codec.py b/Lib/encodings/uu_codec.py index 2a5728fb5b..4e58c62fe9 100644 --- a/Lib/encodings/uu_codec.py +++ b/Lib/encodings/uu_codec.py @@ -20,6 +20,10 @@ def uu_encode(input, errors='strict', filename='<data>', mode=0o666): read = infile.read write = outfile.write + # Remove newline chars from filename + filename = filename.replace('\n','\\n') + filename = filename.replace('\r','\\r') + # Encode write(('begin %o %s\n' % (mode & 0o777, filename)).encode('ascii')) chunk = read(45) |