mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-17 11:39:11 +00:00
[lit] Fix an uninitialized var on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272052 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
babe1202e2
commit
311dd52c44
@ -255,6 +255,7 @@ def _executeShCmd(cmd, shenv, results, timeoutHelper):
|
||||
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':
|
||||
@ -398,7 +399,7 @@ def _executeShCmd(cmd, shenv, results, timeoutHelper):
|
||||
# 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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user