[Patches] [ python-Patches-1776581 ] Minor corrections to smtplib

SourceForge.net noreply at sourceforge.net
Wed Aug 22 00:09:17 CEST 2007


Patches item #1776581, was opened at 2007-08-17 15:52
Message generated for change (Comment added) made by alanmcintyre
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1776581&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Alan McIntyre (alanmcintyre)
Assigned to: Facundo Batista (facundobatista)
Summary: Minor corrections to smtplib

Initial Comment:
Two minor changes:

- In SMTP.send, there is a check for self.sock, which may  not exist if there has been no attempt to connect.  This patch adds a check for hasattr(self, 'sock') so that such an attempt to call send() will raise the more helpful SMTPServerDisconnected instead of an AttributeError.

- The docstring for SMTP.expn is a copy of that of the verify method.  This patch changes it to something more appropriate.

----------------------------------------------------------------------

>Comment By: Alan McIntyre (alanmcintyre)
Date: 2007-08-21 17:09

Message:
Logged In: YES 
user_id=1115903
Originator: YES

The attached file smtplib-misc-fixes-2.diff includes a change to make
test_smtplib.GeneralTests.testNotConnected pass when the original change
for this patch is made.
File Added: smtplib-misc-fixes-2.diff

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1776581&group_id=5470


More information about the Patches mailing list