pwaller / pyprof2calltree

Profile python programs and view them with kcachegrind

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Temp file are not deleted

AmjadHD opened this issue · comments

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.

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.

Thanks, it's fixed.