X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fshow_new.py;h=9e216c5e2033f1b59f4c14b3dc249b2a493527a7;hb=523fe5c7bf7c34bba8aa1125076efcd8fcca7063;hp=5c7e8864263f72928930af51bf64af2a686dc924;hpb=ce828cf5a3557613771eab8f0ad59586bbbcecbb;p=dak.git 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))