From: W. Trevor King Date: Sat, 26 Sep 2009 17:49:26 +0000 (-0400) Subject: Set self.ret if necessary in be-handle-mail.Command.response_msg(). X-Git-Tag: 1.0.0~62^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e35ccf95ea89b6e622202caae30d3b8cca3f2473;p=be.git Set self.ret if necessary in be-handle-mail.Command.response_msg(). If an exception is raised during command exection, self.ret may be left at None. --- diff --git a/interfaces/email/interactive/be-handle-mail b/interfaces/email/interactive/be-handle-mail index 0816dec..fa80698 100755 --- a/interfaces/email/interactive/be-handle-mail +++ b/interfaces/email/interactive/be-handle-mail @@ -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: