mirror of https://github.com/python/cpython
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:
parent
07e6c505ad
commit
6fd08baddc
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue