diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-25 21:12:34 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-25 21:12:34 (GMT) |
commit | 479736b31c2500bc12d09c3ff766de6a2ec68ac0 (patch) | |
tree | 27bfaf3fc19f10f085c0606a5c0381133aff5726 /Lib/base64.py | |
parent | 0b2f5180d73f9239ae621014d0af478ac1887155 (diff) | |
download | cpython-479736b31c2500bc12d09c3ff766de6a2ec68ac0.zip cpython-479736b31c2500bc12d09c3ff766de6a2ec68ac0.tar.gz cpython-479736b31c2500bc12d09c3ff766de6a2ec68ac0.tar.bz2 |
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 a8d9f21..20ed67d 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(): |