fxconv: fix temporary files not being removed

This commit is contained in:
Lephenixnoir 2020-07-13 21:20:09 +02:00
parent 66e2f8429c
commit bd49e9506e
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 4 additions and 0 deletions

View File

@ -976,6 +976,10 @@ def elf(data, output, symbol, toolchain=None, arch=None, section=None,
proc = subprocess.run([
f"{toolchain}-ld", "-r", fp_obj.name + "-tmp", fp_asm.name + ".o",
"-o", output ])
os.remove(fp_obj.name + "-tmp")
os.remove(fp_asm.name + ".o")
if proc.returncode != 0:
raise FxconvError("ld returned {proc.returncode}")