提交 beeed0a6 authored 作者: Frederic Bastien's avatar Frederic Bastien

good clean up on windows (and do not generate bad error

上级 3089eb80
...@@ -1575,9 +1575,17 @@ class Compiler(object): ...@@ -1575,9 +1575,17 @@ class Compiler(object):
if fd is not None: if fd is not None:
os.close(fd) os.close(fd)
finally: finally:
os.remove(path) if os.path.exists(path):
os.remove(exe_path) os.remove(path)
if os.path.exists(exe_path):
os.remove(exe_path)
if os.path.exists(exe_path + ".exe"):
os.remove(exe_path + ".exe")
except OSError, e: except OSError, e:
if err is None:
err = str(e)
else:
err += "\n" + str(e)
compilation_ok = False compilation_ok = False
if not try_run and not output: if not try_run and not output:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论