Temp file are not deleted
AmjadHD opened this issue · comments
Amjad Ben Hedhili commented
try:
subprocess.call([cmd, self.out_file.name])
finally:
# clean the temporary file
if use_temp_file:
os.remove(outfile)
self.out_file = None
This produces a PermissionError cause the temp file is used by kcachegrind when
os.remove(outfile)
is called. Hope you fix it soon cause my temp directory is full of crap.
Peter Waller commented
Apologies, I don't have a windows machine to test on. If you're able to fix it, that would be appreciated. A change to this code was just merged in #41 but as best as I can tell, the same bug is likely present.
Amjad Ben Hedhili commented
Thanks, it's fixed.