diff options
| author | bwarsaw | 2000-10-31 16:40:10 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-10-31 16:40:10 +0000 |
| commit | fa28f0052adffd60e14dce4197126a76ffab089b (patch) | |
| tree | 0aaa007f65972bca78e7ed9b0bc6671785385a71 | |
| parent | cf7eacfd6d9f22a577172254f167b0c9fb8bb614 (diff) | |
| download | mailman-fa28f0052adffd60e14dce4197126a76ffab089b.tar.gz mailman-fa28f0052adffd60e14dce4197126a76ffab089b.tar.zst mailman-fa28f0052adffd60e14dce4197126a76ffab089b.zip | |
| -rwxr-xr-x | Mailman/pythonlib/smtplib.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Mailman/pythonlib/smtplib.py b/Mailman/pythonlib/smtplib.py index 4f6a00d3b..0ac6018e9 100755 --- a/Mailman/pythonlib/smtplib.py +++ b/Mailman/pythonlib/smtplib.py @@ -231,7 +231,11 @@ class SMTP: if not port: port = SMTP_PORT self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) if self.debuglevel > 0: print 'connect:', (host, port) - self.sock.connect((host, port)) + try: + self.sock.connect((host, port)) + except socket.error: + self.close() + raise (code,msg)=self.getreply() if self.debuglevel >0 : print "connect:", msg return (code,msg) |
