From ca2ce4c3ffba031f5ddb84c225d474c910504ac0 Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Wed, 27 Jul 2011 13:05:19 +0200 Subject: [PATCH] commit more often in clean-suites ... to avoid database leaks in case of exceptions Signed-off-by: Torsten Werner --- dak/clean_suites.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dak/clean_suites.py b/dak/clean_suites.py index 5e41d372..b0711acb 100755 --- a/dak/clean_suites.py +++ b/dak/clean_suites.py @@ -298,13 +298,11 @@ SELECT s.id, f.filename FROM source s, files f if not Options["No-Action"]: session.delete(pf) + session.commit() else: utils.fubar("%s is neither symlink nor file?!" % (filename)) - if not Options["No-Action"]: - session.commit() - if count > 0: Logger.log(["total", count, utils.size_type(size)]) print "Cleaned %d files, %s." % (count, utils.size_type(size)) -- 2.39.5