]> granicus.if.org Git - python/commitdiff
remove smtpd dead code (closes #23873)
authorBenjamin Peterson <benjamin@python.org>
Tue, 7 Apr 2015 15:59:06 +0000 (11:59 -0400)
committerBenjamin Peterson <benjamin@python.org>
Tue, 7 Apr 2015 15:59:06 +0000 (11:59 -0400)
Patch by Hoolean.

Lib/smtpd.py

index 0d0030a1ca9857ebf26104d128d1bc2920b98163..db7c8675e851a0467620032d85d651c0d5e5af1c 100755 (executable)
@@ -476,9 +476,6 @@ class SMTPChannel(asynchat.async_chat):
         if not self.extended_smtp and params:
             self.push(syntaxerr)
             return
-        if not address:
-            self.push(syntaxerr)
-            return
         if self.mailfrom:
             self.push('503 Error: nested MAIL command')
             return
@@ -529,15 +526,9 @@ class SMTPChannel(asynchat.async_chat):
             else:
                 self.push(syntaxerr)
                 return
-        if not address:
-            self.push(syntaxerr)
-            return
         if params and len(params.keys()) > 0:
             self.push('555 RCPT TO parameters not recognized or not implemented')
             return
-        if not address:
-            self.push('501 Syntax: RCPT TO: <address>')
-            return
         self.rcpttos.append(address)
         print('recips:', self.rcpttos, file=DEBUGSTREAM)
         self.push('250 OK')