mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-17 21:01:00 +00:00
Catch socket errors when closing SMTP connections.
This commit is contained in:
parent
96de427112
commit
c5676f0297
2 changed files with 6 additions and 1 deletions
|
|
@ -8,6 +8,8 @@ Fixes:
|
|||
- gui: Fix sorting of columns in URL result list.
|
||||
- checking: Fix wrong __init__ call to URL proxy handler.
|
||||
Closes: SF bug #3118254
|
||||
- checking: Catch socket errors (for example socket.timeout)
|
||||
when closing SMTP connections.
|
||||
|
||||
Changes:
|
||||
- dependencies: Require and use Python 2.6.
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import re
|
|||
import urllib
|
||||
import urlparse
|
||||
import smtplib
|
||||
import socket
|
||||
from email._parseaddr import AddressList
|
||||
import sys
|
||||
|
||||
|
|
@ -357,10 +358,12 @@ class MailtoUrl (urlbase.UrlBase):
|
|||
return
|
||||
connection = self.url_connection
|
||||
self.url_connection = None
|
||||
raise
|
||||
try:
|
||||
connection.quit()
|
||||
except smtplib.SMTPException:
|
||||
except (smtplib.SMTPException, socket.error):
|
||||
# ignore close errors
|
||||
# socket.error is raised for example on timeouts
|
||||
pass
|
||||
|
||||
def set_cache_keys (self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue