be-handle-mail now handles non-text comments.
authorW. Trevor King <wking@drexel.edu>
Sat, 18 Jul 2009 15:03:43 +0000 (11:03 -0400)
committerW. Trevor King <wking@drexel.edu>
Sat, 18 Jul 2009 15:03:43 +0000 (11:03 -0400)
commit70c8a070bfa520d72f0a5b487ca3bb2574d6de1e
treead8b54d08dfa4801ebe67abf38f25ac961cbea39
parent111b5358db203c6d4116f285c7112353e03e79c9
be-handle-mail now handles non-text comments.

This required replacing both the codec-wrapped sys.stdin _and_ the raw
sys.__stdin__ with StringIO(stdin).  becommands/comment will use only
one or the other depending on the comment's content type.

Caveat: Get_body_type only grabs the body and type of the first
non-mulitpart section, which may not be what the user expects.

Todo: Add multiple comments for each part of a multipart message, like
we do in interfaces/xml/be-mbox-to-xml.
interfaces/email/interactive/be-handle-mail