]> err.no Git - dak/commitdiff
Tell edit note explicitly about the trainee
authorJoerg Jaspert <joerg@debian.org>
Fri, 1 Oct 2010 21:47:18 +0000 (23:47 +0200)
committerJoerg Jaspert <joerg@debian.org>
Fri, 1 Oct 2010 21:47:18 +0000 (23:47 +0200)
Signed-off-by: Joerg Jaspert <joerg@debian.org>
dak/process_new.py
daklib/queue.py

index dd990f1fc3c53705c392bd9c573606bcd5dd6157..41e9e802ebb2d584e3ecf75767d9f3cd224ccb3c 100755 (executable)
@@ -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)
index dec339af60c310940bb09febd921c8f503b048cd..237fcc73725ebba5b383c4b1483547cd162dd143 100755 (executable)
@@ -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()