[New-bugs-announce] [issue2248] quit() method of SMTP instance (of smtplib) doesn't return it's result

Kei Funagayama report at bugs.python.org
Fri Mar 7 08:42:58 CET 2008


New submission from Kei Funagayama:

Hi,

I've found that the quit() method of SMTP instance (of smtplib) doesn't
return it's result (such as '221 2.0.0 Bye') .
Other methods such as helo(), ehlo(), verify() etc.. returns it's result
correctly so I suppose it's a kind of bug.

I've made a small patch for this so please take a look at it (It looks
like someone just forgot to return the value of docmd()).

below is the code piece to represent the problem.

>>> import smtplib
>>> s = smtplib.SMTP('localhost')
>>> s.helo() #<---- returns result code
(250, 'localhost')
>>> s.vrfy('user at example.com') #<---- returns result code
(554, '5.7.1 <<user at example.com>>: Relay access denied')
>>> s.quit() #<----- doesn't return anything
>>>

Thanks,
Kei

----------
components: Library (Lib)
files: smtplib.py.patch
keywords: patch
messages: 63346
nosy: funagayama
severity: normal
status: open
title: quit() method of SMTP instance (of smtplib) doesn't return it's result
versions: Python 2.4, Python 2.5, Python 2.6
Added file: http://bugs.python.org/file9626/smtplib.py.patch

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2248>
__________________________________


More information about the New-bugs-announce mailing list