aboutsummaryrefslogtreecommitdiffstats
path: root/interfaces/email/interactive/be-handle-mail
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-11-21 13:18:54 -0500
committerW. Trevor King <wking@drexel.edu>2009-11-21 13:18:54 -0500
commit65bf5f8d9ddf51625d6b3b282838a9a4c71868d3 (patch)
tree40c27ffd9e59ed9335c9aeddf3c73d215b01163b /interfaces/email/interactive/be-handle-mail
parent3b03b9aa1bd0d2550fab48940242453cff238508 (diff)
downloadbugseverywhere-65bf5f8d9ddf51625d6b3b282838a9a4c71868d3.tar.gz
Fixed bug in be-handle-mail.Message.parse_comment() for emails w/o Message-id.
You used to get: Uncaught exception: 'NoneType' object has no attribute 'decode' File "./be-handle-mail", line 857, in main m.run() File "./be-handle-mail", line 591, in run command.run() File "./be-handle-mail", line 244, in run manipulate_encodings=False) File "/tmp/be.email-bugs/interfaces/email/interactive/libbe/cmdutil.py", line 82, in execute ret = cmd.execute([a.decode(enc) for a in args], A `print args' in Message.parse_comment() revealed [..., u'--alt-id', None,...]
Diffstat (limited to 'interfaces/email/interactive/be-handle-mail')
-rwxr-xr-xinterfaces/email/interactive/be-handle-mail6
1 files changed, 4 insertions, 2 deletions
diff --git a/interfaces/email/interactive/be-handle-mail b/interfaces/email/interactive/be-handle-mail
index fa80698..8831e3c 100755
--- a/interfaces/email/interactive/be-handle-mail
+++ b/interfaces/email/interactive/be-handle-mail
@@ -564,8 +564,10 @@ class Message (object):
if mime_type == "text/plain":
body = self._strip_footer(body)
content_type = mime_type
- args = [u"--author", author, u"--alt-id", alt_id,
- u"--content-type", content_type, bug_id, u"-"]
+ args = [u"--author", author]
+ if alt_id != None:
+ args.extend([u"--alt-id", alt_id])
+ args.extend([u"--content-type", content_type, bug_id, u"-"])
commands = [Command(self, command, args, stdin=body)]
return commands
def parse_control(self):