summaryrefslogtreecommitdiffstats
path: root/Lib/uu.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-08-27 17:23:59 (GMT)
committerGuido van Rossum <guido@python.org>2007-08-27 17:23:59 (GMT)
commit39478e852827a4ca6955151bf004c7a15099a4b1 (patch)
tree05e52988c7904b7c7dad9427411bece5f9c45fcb /Lib/uu.py
parent85825dc1ff5cc21c5f3f453b30b825a7200609cb (diff)
downloadcpython-39478e852827a4ca6955151bf004c7a15099a4b1.zip
cpython-39478e852827a4ca6955151bf004c7a15099a4b1.tar.gz
cpython-39478e852827a4ca6955151bf004c7a15099a4b1.tar.bz2
Changes in anticipation of stricter str vs. bytes enforcement.
Diffstat (limited to 'Lib/uu.py')
-rwxr-xr-xLib/uu.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/uu.py b/Lib/uu.py
index 084d9f3..18a9f79 100755
--- a/Lib/uu.py
+++ b/Lib/uu.py
@@ -72,12 +72,12 @@ def encode(in_file, out_file, name=None, mode=None):
#
# Write the data
#
- out_file.write('begin %o %s\n' % ((mode & 0o777),name))
+ out_file.write(('begin %o %s\n' % ((mode & 0o777), name)).encode("ascii"))
data = in_file.read(45)
while len(data) > 0:
- out_file.write(str(binascii.b2a_uu(data), "ascii"))
+ out_file.write(binascii.b2a_uu(data))
data = in_file.read(45)
- out_file.write(' \nend\n')
+ out_file.write(b' \nend\n')
def decode(in_file, out_file=None, mode=None, quiet=0):