[MERGE] improve SMTPConnection connection setup
James Henstridge
james at jamesh.id.au
Mon Oct 22 06:41:03 BST 2007
On 20/10/2007, John Arbash Meinel <john at arbash-meinel.com> wrote:
> BB:resubmit
>
> It turns out that this patch breaks some tests.
>
> Specifically it is breaking:
> bzrlib.tests.blackbox.test_merge_directive.TestMergeDirective.test_mail_default
>
> Something about:
> ..
>
> File "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/smtp_connection.py", line
> 83, in _create_connection
> code, resp = self._connection.ehlo()
> File "/usr/lib/python2.4/smtplib.py", line 397, in ehlo
> self.putcmd("ehlo", name or self.local_hostname)
> File "/usr/lib/python2.4/smtplib.py", line 333, in putcmd
> self.send(str)
> File "/usr/lib/python2.4/smtplib.py", line 318, in send
> if self.sock:
>
> AttributeError: SMTP instance has no attribute 'sock'
>
>
> I'm guessing this is just because the merge-directive stub is not fully
> conformant and needs to be updated slightly. Would it be possible to use the
> new Stub instead? (Since it seems to be rather full featured, though it may be
> focused on connection errors.)
Here is an updated version that passes all the tests.
I updated the merge_directive tests to replace the ehlo() and
has_extn() methods instead of starttls(), emulating an ESMTP server
without support for any extensions.
James.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bzr-smtp-setup.patch
Type: text/x-diff
Size: 13307 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071022/91c8348e/attachment.bin
More information about the bazaar
mailing list