From 0ae70b5ff79d947b4163a585f810c07730abc4b0 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Fri, 1 Oct 2010 23:47:18 +0200 Subject: [PATCH] Tell edit note explicitly about the trainee Signed-off-by: Joerg Jaspert --- dak/process_new.py | 2 +- daklib/queue.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dak/process_new.py b/dak/process_new.py index dd990f1f..41e9e802 100755 --- a/dak/process_new.py +++ b/dak/process_new.py @@ -485,7 +485,7 @@ def do_new(upload, session): done = 1 elif answer == 'N': edit_note(get_new_comments(changes.get("source", ""), session=session), - upload, session) + upload, session, bool(Options["Trainee"])) elif answer == 'P' and not Options["Trainee"]: prod_maintainer(get_new_comments(changes.get("source", ""), session=session), upload) diff --git a/daklib/queue.py b/daklib/queue.py index dec339af..237fcc73 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -332,7 +332,7 @@ def prod_maintainer(notes, upload): ################################################################################ -def edit_note(note, upload, session): +def edit_note(note, upload, session, trainee=False): # Write the current data to a temporary file (fd, temp_filename) = utils.temp_filename() editor = os.environ.get("EDITOR","vi") @@ -364,7 +364,7 @@ def edit_note(note, upload, session): comment.version = upload.pkg.changes["version"] comment.comment = newnote comment.author = utils.whoami() - comment.trainee = bool(Options["Trainee"]) + comment.trainee = trainee session.add(comment) session.commit() -- 2.39.5