[MERGE][#346998] Fix MAPI send to email addresses
Alexander Belchenko
bialix at ukr.net
Sat Apr 11 09:58:38 BST 2009
Neil Martinsen-Burrell пишет:
> John caught a regression against 1.12 in MAPIClient when trying to send
> to an email address. The body parameter was not being properly
> propagated. The attached (trivial) fix solves the problem. I have not
> reduced the test coverage because there was none to begin with (hence
> the regression) but I wasn't able to imagine a reasonable way to test
> interaction with an external program, much less an external protocol. It
> appears that MAPIClient is completely untested.
bb:resubmit please
=== modified file 'bzrlib/mail_client.py'
--- bzrlib/mail_client.py 2009-03-23 14:59:43 +0000
+++ bzrlib/mail_client.py 2009-04-11 03:59:03 +0000
@@ -147,12 +147,9 @@
outfile.write(attachment)
finally:
outfile.close()
- if body is not None:
- kwargs = {'body': body}
- else:
- kwargs = {}
+ kwargs = {'body': body}
self._compose(prompt, to, subject, attach_path, mime_subtype,
- extension, **kwargs)
+ extension, body=body)
It seems like kwargs is not used in your patch at all.
So you either should remove it completely (i.e. delete kwargs = {'body': body} line)
or use it in self._compose call (i.e. revert change in the last line).
More information about the bazaar
mailing list