From bd49e9506e0667ced1caa71979805fb41faf4a8a Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Mon, 13 Jul 2020 21:20:09 +0200 Subject: [PATCH] fxconv: fix temporary files not being removed --- fxconv/fxconv.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fxconv/fxconv.py b/fxconv/fxconv.py index 5a93d25..8dcc4af 100644 --- a/fxconv/fxconv.py +++ b/fxconv/fxconv.py @@ -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}")