[New-bugs-announce] [issue2248] quit() method of SMTP instance (of smtplib) doesn't return it's result
report at bugs.python.org
Fri Mar 7 08:42:58 CET 2008
New submission from Kei Funagayama:
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
>>> 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
components: Library (Lib)
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>
More information about the New-bugs-announce