summaryrefslogtreecommitdiffstats
path: root/Lib/smtpd.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-10-23 19:25:41 (GMT)
committerGuido van Rossum <guido@python.org>2007-10-23 19:25:41 (GMT)
commit910ab50091f650481d1875c9c4c5cf91087856f2 (patch)
tree49933c57a4ecd7d26a1c5748310bbccd8cfedeb7 /Lib/smtpd.py
parentfef8be66e35df7ca1db1c377a760b551086e64bf (diff)
downloadcpython-910ab50091f650481d1875c9c4c5cf91087856f2.zip
cpython-910ab50091f650481d1875c9c4c5cf91087856f2.tar.gz
cpython-910ab50091f650481d1875c9c4c5cf91087856f2.tar.bz2
Issue 1307 by Derek Shockey, fox the same bug for RCPT.
Neal: please backport!
Diffstat (limited to 'Lib/smtpd.py')
-rwxr-xr-xLib/smtpd.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/smtpd.py b/Lib/smtpd.py
index 4aa3476..e09774f 100755
--- a/Lib/smtpd.py
+++ b/Lib/smtpd.py
@@ -237,7 +237,7 @@ class SMTPChannel(asynchat.async_chat):
if not self.__mailfrom:
self.push('503 Error: need MAIL command')
return
- address = self.__getaddr('TO:', arg)
+ address = self.__getaddr('TO:', arg) if arg else None
if not address:
self.push('501 Syntax: RCPT TO: <address>')
return