]> err.no Git - dak/commitdiff
end() is not defined in daklib/queue.py
authorLuca Falavigna <dktrkranz@debian.org>
Mon, 13 Aug 2012 19:33:13 +0000 (19:33 +0000)
committerLuca Falavigna <dktrkranz@debian.org>
Mon, 13 Aug 2012 19:33:13 +0000 (19:33 +0000)
Signed-off-by: Luca Falavigna <dktrkranz@debian.org>
dak/process_new.py
daklib/queue.py

index b3a4a3b61ad22a90101fdc9b460376a1c04f94da..75cb975c8e0d1e07dd7d9ebeb3bdb3c5d0841d93 100755 (executable)
@@ -532,11 +532,15 @@ def do_new(upload, upload_copy, handler, session):
                 handler.reject(reason)
                 done = True
         elif answer == 'N':
-            edit_note(get_new_comments(upload.changes.source, session=session),
-                      upload, session, bool(Options["Trainee"]))
+            if edit_note(get_new_comments(upload.changes.source, session=session),
+                         upload, session, bool(Options["Trainee"])) == 0:
+                end()
+                sys.exit(0)
         elif answer == 'P' and not Options["Trainee"]:
-            prod_maintainer(get_new_comments(upload.changes.source, session=session),
-                            upload)
+            if prod_maintainer(get_new_comments(upload.changes.source, session=session),
+                               upload) == 0:
+                end()
+                sys.exit(0)
             Logger.log(["NEW PROD", upload.changes.changesname])
         elif answer == 'R' and not Options["Trainee"]:
             confirm = utils.our_raw_input("Really clear note (y/N)? ").lower()
index 6f01ba6cbb0ea22472b2213ab35a9270008795ba..e81614c3e742e89a2b1b8c6538e8f65a712bcbe5 100644 (file)
@@ -132,8 +132,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"])
@@ -186,8 +185,7 @@ def edit_note(note, upload, session, trainee=False):
     if answer == 'A':
         return
     elif answer == 'Q':
-        end()
-        sys.exit(0)
+        return 0
 
     comment = NewComment()
     comment.package = upload.changes.source