diff options
author | Fred Drake <fdrake@acm.org> | 2001-02-23 20:04:54 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-02-23 20:04:54 (GMT) |
commit | 6fd08baddc899d342129d646058ff921650b8573 (patch) | |
tree | 53556e71895bf71954872d9c072153665e980e65 /Lib/mimetools.py | |
parent | 07e6c505ad76a7d55867775057a580e4d24a9931 (diff) | |
download | cpython-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.
Diffstat (limited to 'Lib/mimetools.py')
-rw-r--r-- | Lib/mimetools.py | 6 |
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') |