summaryrefslogtreecommitdiffstats
path: root/Lib/mimetools.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/mimetools.py')
-rw-r--r--Lib/mimetools.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/mimetools.py b/Lib/mimetools.py
index f97787a..f1e20d4 100644
--- a/Lib/mimetools.py
+++ b/Lib/mimetools.py
@@ -202,8 +202,8 @@ def pipeto(input, command):
pipe.close()
def pipethrough(input, command, output):
- tempname = tempfile.mktemp()
- temp = open(tempname, 'w')
+ (fd, tempname) = tempfile.mkstemp()
+ temp = os.fdopen(fd, 'w')
copyliteral(input, temp)
temp.close()
pipe = os.popen(command + ' <' + tempname, 'r')