From: Torsten Werner Date: Mon, 5 Jul 2010 20:44:11 +0000 (+0000) Subject: show-new: open a new session for every source package X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=a2f694e9c7b834183482e9c89f8ae0c9002cd1f1;p=dak.git show-new: open a new session for every source package Signed-off-by: Torsten Werner --- 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))