From: Joerg Jaspert Date: Wed, 25 Nov 2009 21:21:29 +0000 (+0100) Subject: Do not break manual rejects when a note exists X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed2d1928a25b95eb69616cf10bedd02c40740d8d;p=dak Do not break manual rejects when a note exists Signed-off-by: Joerg Jaspert --- diff --git a/dak/process_new.py b/dak/process_new.py index 7841a7d7..060fa236 100755 --- a/dak/process_new.py +++ b/dak/process_new.py @@ -679,7 +679,7 @@ def do_new(upload, session): elif answer == 'M' and not Options["Trainee"]: aborted = upload.do_reject(manual=1, reject_message=Options["Manual-Reject"], - note=get_new_comments(changes.get("source", ""), session=session)) + notes=get_new_comments(changes.get("source", ""), session=session)) if not aborted: upload.pkg.remove_known_changes(session=session) session.commit() diff --git a/daklib/queue.py b/daklib/queue.py index c9a65328..5ea545fd 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -2061,7 +2061,7 @@ distribution.""" os.close(dest_fd) ########################################################################### - def do_reject (self, manual=0, reject_message="", note=""): + def do_reject (self, manual=0, reject_message="", notes=""): """ Reject an upload. If called without a reject message or C{manual} is true, spawn an editor so the user can write one. @@ -2080,9 +2080,10 @@ distribution.""" if manual and not reject_message: (fd, temp_filename) = utils.temp_filename() temp_file = os.fdopen(fd, 'w') - if len(note) > 0: - for line in note: - temp_file.write(line) + if len(notes) > 0: + for note in notes: + temp_file.write("\nAuthor: %s\nVersion: %s\nTimestamp: %s\n\n%s" \ + % (note.author, note.version, note.notedate, note.comment)) temp_file.close() editor = os.environ.get("EDITOR","vi") answer = 'E'