提交 70bf5e3a authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Make sure we remove the exe_path even if try_run is False.

上级 33c507f0
......@@ -1836,19 +1836,15 @@ class GCC_compiler(object):
if p_ret != 0:
compilation_ok = False
elif try_run:
# Try to execute the program
try:
out, err, p_ret = output_subprocess_Popen([exe_path])
run_ok = (p_ret == 0)
finally:
os.remove(exe_path)
out, err, p_ret = output_subprocess_Popen([exe_path])
run_ok = (p_ret == 0)
finally:
try:
if fd is not None:
os.close(fd)
finally:
os.remove(path)
os.remove(exe_path)
except OSError, e:
compilation_ok = False
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论