summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-10-22 16:27:19 (GMT)
committerGuido van Rossum <guido@python.org>2007-10-22 16:27:19 (GMT)
commit5e81270b22ee6cfe6d7ead43ccbc258964cf14a7 (patch)
treee895e9c5e562e2dec4d1ea90e04641cde006c1de /Lib
parentaef8e55269ad4e35b5ac6b8e0d47dcbda1d20b02 (diff)
downloadcpython-5e81270b22ee6cfe6d7ead43ccbc258964cf14a7.zip
cpython-5e81270b22ee6cfe6d7ead43ccbc258964cf14a7.tar.gz
cpython-5e81270b22ee6cfe6d7ead43ccbc258964cf14a7.tar.bz2
Issue #1307, patch by Derek Shockey.
When "MAIL" is received without args, an exception happens instead of sending a 501 syntax error response.
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/smtpd.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/smtpd.py b/Lib/smtpd.py
index c656ec7..4aa3476 100755
--- a/Lib/smtpd.py
+++ b/Lib/smtpd.py
@@ -221,7 +221,7 @@ class SMTPChannel(asynchat.async_chat):
def smtp_MAIL(self, arg):
print >> DEBUGSTREAM, '===> MAIL', arg
- address = self.__getaddr('FROM:', arg)
+ address = self.__getaddr('FROM:', arg) if arg else None
if not address:
self.push('501 Syntax: MAIL FROM:<address>')
return