X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=daklib%2Fqueue.py;h=5a5c8f90f07db110f4a6150f1c7eff66fb9143ff;hb=fa727dcf0058058565278421d16ea75c156e7fa3;hp=6f01ba6cbb0ea22472b2213ab35a9270008795ba;hpb=09a1a20566dcf84ca229b4339bd8f8080eb59afd;p=dak.git diff --git a/daklib/queue.py b/daklib/queue.py index 6f01ba6c..5a5c8f90 100644 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -41,8 +41,6 @@ from types import * from sqlalchemy.sql.expression import desc from sqlalchemy.orm.exc import NoResultFound -import yaml - from dak_exceptions import * from changes import * from regexes import * @@ -104,12 +102,12 @@ def check_valid(overrides, session): def prod_maintainer(notes, upload): cnf = Config() changes = upload.changes + whitelists = [ upload.target_suite.mail_whitelist ] # Here we prepare an editor and get them ready to prod... (fd, temp_filename) = utils.temp_filename() temp_file = os.fdopen(fd, 'w') - for note in notes: - temp_file.write(note.comment) + temp_file.write("\n\n=====\n\n".join([note.comment for note in notes])) temp_file.close() editor = os.environ.get("EDITOR","vi") answer = 'E' @@ -132,8 +130,7 @@ def prod_maintainer(notes, upload): if answer == 'A': return elif answer == 'Q': - end() - sys.exit(0) + return 0 # Otherwise, do the proding... user_email_address = utils.whoami() + " <%s>" % ( cnf["Dinstall::MyAdminAddress"]) @@ -156,7 +153,7 @@ def prod_maintainer(notes, upload): Subst,cnf["Dir::Templates"]+"/process-new.prod") # Send the prod mail - utils.send_mail(prod_mail_message) + utils.send_mail(prod_mail_message, whitelists=whitelists) print "Sent prodding message" @@ -186,10 +183,10 @@ def edit_note(note, upload, session, trainee=False): if answer == 'A': return elif answer == 'Q': - end() - sys.exit(0) + return 0 comment = NewComment() + comment.policy_queue = upload.policy_queue comment.package = upload.changes.source comment.version = upload.changes.version comment.comment = newnote @@ -202,7 +199,7 @@ def edit_note(note, upload, session, trainee=False): # FIXME: Should move into the database # suite names DMs can upload to -dm_suites = ['unstable', 'experimental', 'squeeze-backports'] +dm_suites = ['unstable', 'experimental', 'squeeze-backports','squeeze-backports-sloppy', 'wheezy-backports'] def get_newest_source(source, session): 'returns the newest DBSource object in dm_suites'