Set self.ret if necessary in be-handle-mail.Command.response_msg().
authorW. Trevor King <wking@drexel.edu>
Sat, 26 Sep 2009 17:49:26 +0000 (13:49 -0400)
committerW. Trevor King <wking@drexel.edu>
Sat, 26 Sep 2009 17:49:26 +0000 (13:49 -0400)
If an exception is raised during command exection, self.ret may be
left at None.

interfaces/email/interactive/be-handle-mail

index 0816deccd04d9e8905a8dfae89da1dac15ac4184..fa8069888d4734cbe681a4a7c113a9a45691c5c2 100755 (executable)
@@ -265,6 +265,7 @@ class Command (object):
             raise self.err
         return (self.ret, self.stdout, self.stderr)
     def response_msg(self):
+        if self.ret == None: self.ret = -1
         response_body = [u"Results of running: (exit code %d)" % self.ret,
                          u"  %s %s" % (self.command, u" ".join(self.args))]
         if self.stdout != None and len(self.stdout) > 0: