handler:get: Responses from this handler are complete.
authorW. Trevor King <wking@tremily.us>
Sun, 2 Sep 2012 14:33:09 +0000 (10:33 -0400)
committerW. Trevor King <wking@tremily.us>
Sun, 2 Sep 2012 14:36:02 +0000 (10:36 -0400)
This avoids double-signing emails and other atrocities.

pygrader/handler/get.py

index 1f44c4dc0a690d796cb4b4dec5bbc59f4370bbe2..e354d2ad1d9700971ebf2e8edabab15458ad861e 100644 (file)
@@ -373,7 +373,7 @@ def run(basedir, course, message, person, subject,
     else:
         raise NotImplementedError(
             'strange groups {} for {}'.format(person.groups, person))
-    raise _Response(message=email)
+    raise _Response(message=email, complete=True)
 
 def _get_student_email(basedir, course, person, student=None):
     if student is None:
@@ -399,7 +399,7 @@ def _get_student_email(basedir, course, person, student=None):
                 ).format(student.name)
         message = _pgp_mime.encodedMIMEText(text)
         message['Subject'] = 'No grades for {}'.format(student.alias())
-        raise _Response(message=message)
+        raise _Response(message=message, complete=True)
     elif len(emails) > 1:
         raise NotImplementedError(emails)
     email,callback = emails[0]