Fix a WTF noticed by Jerry Seutter.

This commit is contained in:
Barry Warsaw 2008-03-19 14:25:51 +00:00
parent 39e307e224
commit c918171df8
1 changed files with 2 additions and 2 deletions

View File

@ -264,11 +264,11 @@ class SMTP:
"""
self.debuglevel = debuglevel
def _get_socket(self, port, host, timeout):
def _get_socket(self, host, port, timeout):
# This makes it simpler for SMTP_SSL to use the SMTP connect code
# and just alter the socket connection bit.
if self.debuglevel > 0: print('connect:', (host, port), file=stderr)
return socket.create_connection((port, host), timeout)
return socket.create_connection((host, port), timeout)
def connect(self, host='localhost', port = 0):
"""Connect to a host on a given port.