summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-08-13 19:06:38 (GMT)
committerGuido van Rossum <guido@python.org>2007-08-13 19:06:38 (GMT)
commit5424df2f7ee8cc0e8d177f0c035120a24addd455 (patch)
tree31634910840018ef6dc923e01c3bce69c7911674
parentfc9ba9318fc817baf47b4af6e59029be516b5f3d (diff)
downloadcpython-5424df2f7ee8cc0e8d177f0c035120a24addd455.zip
cpython-5424df2f7ee8cc0e8d177f0c035120a24addd455.tar.gz
cpython-5424df2f7ee8cc0e8d177f0c035120a24addd455.tar.bz2
Patch suggested Paul Colomiets fixes test_threaded_import.py.
-rw-r--r--Lib/tempfile.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
index 82e5ec0..61c64e4 100644
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -197,8 +197,8 @@ def _get_default_tempdir():
filename = _os.path.join(dir, name)
try:
fd = _os.open(filename, flags, 0o600)
- fp = _io.open(fd, 'w')
- fp.write('blat')
+ fp = _io.open(fd, 'wb')
+ fp.write(b'blat')
fp.close()
_os.unlink(filename)
del fp, fd