From: Joerg Jaspert Date: Fri, 1 Oct 2010 21:47:18 +0000 (+0200) Subject: Tell edit note explicitly about the trainee X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ae70b5ff79d947b4163a585f810c07730abc4b0;p=dak Tell edit note explicitly about the trainee Signed-off-by: Joerg Jaspert --- 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()