mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-27 09:34:42 +00:00
Ignore errors trying to get FTP feature set.
This commit is contained in:
parent
74ea444a9a
commit
a2978209e6
2 changed files with 10 additions and 4 deletions
|
|
@ -12,6 +12,8 @@ Fixes:
|
|||
Closes: SF bug #3392021
|
||||
- configuration: Parse logger and logging part names case insensitive.
|
||||
Closes: SF bug #3380114
|
||||
- checking: Ignore errors trying to get FTP feature set.
|
||||
Closes: SF bug #3424719
|
||||
|
||||
Features:
|
||||
- checking: If a warning regex is configured, multiple matches in
|
||||
|
|
|
|||
|
|
@ -119,10 +119,14 @@ class FtpUrl (internpaturl.InternPatternUrl, proxysupport.ProxySupport):
|
|||
def negotiate_encoding (self):
|
||||
"""Check if server can handle UTF-8 encoded filenames.
|
||||
See also RFC 2640."""
|
||||
features = self.url_connection.sendcmd("FEAT")
|
||||
log.debug(LOG_CHECK, "FTP features %s", features)
|
||||
if " UTF-8" in features.splitlines():
|
||||
self.filename_encoding = "utf-8"
|
||||
try:
|
||||
features = self.url_connection.sendcmd("FEAT")
|
||||
except ftplib.error_perm, msg:
|
||||
log.debug(LOG_CHECK, "Ignoring error when getting FTP features: %s" % msg)
|
||||
else:
|
||||
log.debug(LOG_CHECK, "FTP features %s", features)
|
||||
if " UTF-8" in features.splitlines():
|
||||
self.filename_encoding = "utf-8"
|
||||
|
||||
def cwd (self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue