git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272052
91177308-0d34-0410-b5e6-
96231b3b80d8
result = subprocess.PIPE
else:
if r[2] is None:
+ redir_filename = None
if kAvoidDevNull and r[0] == '/dev/null':
r[2] = tempfile.TemporaryFile(mode=r[1])
elif kIsWindows and r[0] == '/dev/tty':
# Gather the redirected output files.
output_files = []
for (name, mode, f, path) in sorted(opened_files):
- if mode in ('w', 'a'):
+ if path is not None and mode in ('w', 'a'):
try:
with open(path) as f:
data = f.read()