1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-27 02:16:12 +01:00

fixed tempfile leaking in osc diff function

The osc diff function leaves tempfiles in /tmp after finished.
Call os.unlink() to remove the file if no longer needed.
This commit is contained in:
Danny Kukawka 2010-06-28 13:00:34 +02:00
parent 1438ca5c1b
commit f41d842d3e

View File

@ -3154,6 +3154,7 @@ def make_diff(wc, revision):
diff.append(get_source_file_diff(os.path.dirname(tmpfile), os.path.basename(tmpfile), diff.append(get_source_file_diff(os.path.dirname(tmpfile), os.path.basename(tmpfile),
revision, file, cmp_pac.storedir, file)) revision, file, cmp_pac.storedir, file))
os.unlink(tmpfile)
os.chdir(olddir) os.chdir(olddir)
if cmp_pac != None: if cmp_pac != None:
delete_dir(cmp_pac.absdir) delete_dir(cmp_pac.absdir)