From 6fd08baddc899d342129d646058ff921650b8573 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 23 Feb 2001 20:04:54 +0000 Subject: [PATCH] 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. --- Lib/mimetools.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Lib/mimetools.py b/Lib/mimetools.py index 81913bdf3d7..7cf8ad672e0 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')