]> git.decadent.org.uk Git - dak.git/blobdiff - dak/process_new.py
fix function prod_maintainer()
[dak.git] / dak / process_new.py
index 6112186dd58d3a41fdea13905c5a5d214d2d13d2..74bae8fe4cef50f98e52c5bf39837c5664a4d0bb 100755 (executable)
@@ -448,14 +448,13 @@ def add_overrides (new, upload, session):
 
 ################################################################################
 
-def prod_maintainer (note, upload):
+def prod_maintainer (notes, upload):
     cnf = Config()
     # Here we prepare an editor and get them ready to prod...
     (fd, temp_filename) = utils.temp_filename()
     temp_file = os.fdopen(fd, 'w')
-    if len(note) > 0:
-        for line in note:
-            temp_file.write(line)
+    for note in notes:
+        temp_file.write(note.comment)
     temp_file.close()
     editor = os.environ.get("EDITOR","vi")
     answer = 'E'
@@ -493,9 +492,8 @@ def prod_maintainer (note, upload):
     prod_mail_message = utils.TemplateSubst(
         Subst,cnf["Dir::Templates"]+"/process-new.prod")
 
-    # Send the prod mail if appropriate
-    if not cnf["Dinstall::Options::No-Mail"]:
-        utils.send_mail(prod_mail_message)
+    # Send the prod mail
+    utils.send_mail(prod_mail_message)
 
     print "Sent proding message"
 
@@ -555,7 +553,7 @@ def do_new(upload, session):
             try:
                 check_daily_lock()
                 done = add_overrides (new, upload, session)
-                new_accept(upload, session)
+                new_accept(upload, Options["No-Action"], session)
                 Logger.log(["NEW ACCEPT: %s" % (upload.pkg.changes_file)])
             except CantGetLockError:
                 print "Hello? Operator! Give me the number for 911!"
@@ -766,25 +764,11 @@ def do_pkg(changes_file, session):
                 else:
                     try:
                         check_daily_lock()
-                        new_accept(u, session)
+                        new_accept(u, Options["No-Action"], session)
                     except CantGetLockError:
                         print "Hello? Operator! Give me the number for 911!"
                         print "Dinstall in the locked area, cant process packages, come back later"
-#             (new, byhand) = check_status(files)
-#             if new or byhand:
-#                 if new:
-#                     do_new(u, session)
-#                 if byhand:
-#                     do_byhand(u, session)
-#                 (new, byhand) = check_status(files)
-
-#             if not new and not byhand:
-#                 try:
-#                     check_daily_lock()
-#                     do_accept(u)
-#                 except CantGetLockError:
-#                     print "Hello? Operator! Give me the number for 911!"
-#                     print "Dinstall in the locked area, cant process packages, come back later"
+
     except AlreadyLockedError, e:
         print "Seems to be locked by %s already, skipping..." % (e)
 
@@ -846,9 +830,6 @@ def main():
         sys.stderr.write("Sorting changes...\n")
     changes_files = sort_changes(changes_files, session)
 
-    # Kill me now? **FIXME**
-    cnf["Dinstall::Options::No-Mail"] = ""
-
     for changes_file in changes_files:
         changes_file = utils.validate_changes_file_arg(changes_file, 0)
         if not changes_file: