From f41d842d3edd9c28eedb76d67abf0609531bb3f0 Mon Sep 17 00:00:00 2001 From: Danny Kukawka Date: Mon, 28 Jun 2010 13:00:34 +0200 Subject: [PATCH] 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. --- osc/core.py | 1 + 1 file changed, 1 insertion(+) diff --git a/osc/core.py b/osc/core.py index 354a6d04..8ae08e2a 100644 --- a/osc/core.py +++ b/osc/core.py @@ -3154,6 +3154,7 @@ def make_diff(wc, revision): diff.append(get_source_file_diff(os.path.dirname(tmpfile), os.path.basename(tmpfile), revision, file, cmp_pac.storedir, file)) + os.unlink(tmpfile) os.chdir(olddir) if cmp_pac != None: delete_dir(cmp_pac.absdir)