X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fprocess_policy.py;h=3f237f626b506b5cb929c4fc4ede505530cc748f;hb=b138ff4acdfc4d83e1a394e4e5e2663c288378a7;hp=d1377b97097debe4c19be69f91eaa566d8527175;hpb=076d0a9a0f88c8e86fc206b491f73ea6e8c71fa0;p=dak.git diff --git a/dak/process_policy.py b/dak/process_policy.py index d1377b97..3f237f62 100755 --- a/dak/process_policy.py +++ b/dak/process_policy.py @@ -54,7 +54,7 @@ def do_comments(dir, srcqueue, opref, npref, line, fn, session): for comm in [ x for x in os.listdir(dir) if x.startswith(opref) ]: lines = open("%s/%s" % (dir, comm)).readlines() if len(lines) == 0 or lines[0] != line + "\n": continue - changes_files = [ x for x in os.listdir(".") if x.startswith(comm[7:]+"_") + changes_files = [ x for x in os.listdir(".") if x.startswith(comm[len(opref):]+"_") and x.endswith(".changes") ] changes_files = sort_changes(changes_files, session) for f in changes_files: @@ -141,8 +141,8 @@ def main(): if not Options["No-Action"]: try: - Logger = daklog.Logger(cnf, "process-policy") - except CantOpenError, e: + Logger = daklog.Logger("process-policy") + except CantOpenError as e: Logger = None # Find policy queue @@ -158,6 +158,7 @@ def main(): # The comments stuff relies on being in the right directory os.chdir(pq.path) do_comments(commentsdir, pq, "ACCEPT.", "ACCEPTED.", "OK", comment_accept, session) + do_comments(commentsdir, pq, "ACCEPTED.", "ACCEPTED.", "OK", comment_accept, session) do_comments(commentsdir, pq, "REJECT.", "REJECTED.", "NOTOK", comment_reject, session)