diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-25 21:32:42 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-25 21:32:42 (GMT) |
commit | 20f4b447f5cafcfebbc785cba1a7f3b363e794af (patch) | |
tree | 38a33fc3befec8ffd92db8d46e1fb33a7f551779 /Lib/base64.py | |
parent | 73ffb8b55279ccb20cfdea0f0d21d030edfc0ab4 (diff) | |
download | cpython-20f4b447f5cafcfebbc785cba1a7f3b363e794af.zip cpython-20f4b447f5cafcfebbc785cba1a7f3b363e794af.tar.gz cpython-20f4b447f5cafcfebbc785cba1a7f3b363e794af.tar.bz2 |
Merged revisions 81533 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r81533 | victor.stinner | 2010-05-25 23:12:34 +0200 (mar., 25 mai 2010) | 3 lines
Issue #4769: Fix main() function of the base64 module, use sys.stdin.buffer and
sys.stdout.buffer (instead of sys.stdin and sys.stdout) to use the bytes API
........
Diffstat (limited to 'Lib/base64.py')
-rwxr-xr-x | Lib/base64.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/base64.py b/Lib/base64.py index e708136..b31c410 100755 --- a/Lib/base64.py +++ b/Lib/base64.py @@ -383,9 +383,9 @@ def main(): if o == '-u': func = decode if o == '-t': test(); return if args and args[0] != '-': - func(open(args[0], 'rb'), sys.stdout) + func(open(args[0], 'rb'), sys.stdout.buffer) else: - func(sys.stdin, sys.stdout) + func(sys.stdin.buffer, sys.stdout.buffer) def test(): |