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
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495

View file

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