summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-02-23 20:04:54 (GMT)
committerFred Drake <fdrake@acm.org>2001-02-23 20:04:54 (GMT)
commit6fd08baddc899d342129d646058ff921650b8573 (patch)
tree53556e71895bf71954872d9c072153665e980e65
parent07e6c505ad76a7d55867775057a580e4d24a9931 (diff)
downloadcpython-6fd08baddc899d342129d646058ff921650b8573.zip
cpython-6fd08baddc899d342129d646058ff921650b8573.tar.gz
cpython-6fd08baddc899d342129d646058ff921650b8573.tar.bz2
Do not hide a failure to create a temporary file; if it fails the work
will not have been done, and applications need to know that. Also, do not print a message about it; the exception is the right thing. This closes SF bug #133717.
-rw-r--r--Lib/mimetools.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/Lib/mimetools.py b/Lib/mimetools.py
index 81913bd..7cf8ad6 100644
--- a/Lib/mimetools.py
+++ b/Lib/mimetools.py
@@ -204,11 +204,7 @@ def pipeto(input, command):
def pipethrough(input, command, output):
tempname = tempfile.mktemp()
- try:
- temp = open(tempname, 'w')
- except IOError:
- print '*** Cannot create temp file', `tempname`
- return
+ temp = open(tempname, 'w')
copyliteral(input, temp)
temp.close()
pipe = os.popen(command + ' <' + tempname, 'r')