X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fshow_new.py;h=9e216c5e2033f1b59f4c14b3dc249b2a493527a7;hb=c3716905df27ae0470651380099a7781ea5f79ed;hp=bcf1300e155fcdb0b0077b68b95366f503bc0b87;hpb=ab7ef648bcd71efb08d2f4949abe8ad0ac3251a0;p=dak.git diff --git a/dak/show_new.py b/dak/show_new.py index bcf1300e..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) @@ -177,15 +178,13 @@ def do_pkg(changes_file, session): filestoexamine = [] for pkg in new.keys(): for fn in new[pkg]["files"]: - if (files[fn].has_key("new") and - (files[fn]["type"] == "dsc" or - not re_source_ext.match(files[fn]["type"]))): - filestoexamine.append(fn) + filestoexamine.append(fn) html_header(changes["source"], filestoexamine) check_valid(new) - examine_package.display_changes( u.pkg.changes["distribution"], changes_file) + distribution = changes["distribution"].keys()[0] + examine_package.display_changes(distribution, changes_file) for fn in filter(lambda fn: fn.endswith(".dsc"), filestoexamine): examine_package.check_dsc(distribution, fn) @@ -196,6 +195,7 @@ def do_pkg(changes_file, session): if sys.stdout != stdout_fd: sys.stdout.close() sys.stdout = stdout_fd + session.close() ################################################################################ @@ -247,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))