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.
This commit is contained in:
Fred Drake 2001-02-23 20:04:54 +00:00
parent 07e6c505ad
commit 6fd08baddc
1 changed files with 1 additions and 5 deletions

View File

@ -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')