From a2f694e9c7b834183482e9c89f8ae0c9002cd1f1 Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Mon, 5 Jul 2010 20:44:11 +0000 Subject: [PATCH] show-new: open a new session for every source package Signed-off-by: Torsten Werner --- dak/show_new.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dak/show_new.py b/dak/show_new.py index 5c7e8864..9e216c5e 100755 --- a/dak/show_new.py +++ b/dak/show_new.py @@ -143,7 +143,8 @@ def html_footer(): ################################################################################ -def do_pkg(changes_file, session): +def do_pkg(changes_file): + session = DBConn().session() u = Upload() u.pkg.changes_file = changes_file (u.pkg.changes["fingerprint"], rejects) = utils.check_signature(changes_file) @@ -194,6 +195,7 @@ def do_pkg(changes_file, session): if sys.stdout != stdout_fd: sys.stdout.close() sys.stdout = stdout_fd + session.close() ################################################################################ @@ -245,7 +247,7 @@ def main(): if not changes_file: continue print "\n" + changes_file - do_pkg (changes_file, session) + do_pkg (changes_file) files = set(os.listdir(cnf["Show-New::HTMLPath"])) to_delete = filter(lambda x: x.endswith(".html"), files.difference(sources)) -- 2.39.5