mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-05 05:04:46 +00:00
only set connection debug level if CHECK logging is on debug
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2388 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
7563f0edf9
commit
dc960185df
3 changed files with 3 additions and 3 deletions
|
|
@ -98,7 +98,7 @@ class FtpUrl (urlbase.UrlBase, proxysupport.ProxySupport):
|
|||
return
|
||||
try:
|
||||
self.url_connection = ftplib.FTP()
|
||||
if self.consumer.config.get("debug"):
|
||||
if linkcheck.log.is_debug(linkcheck.LOG_CHECK):
|
||||
self.url_connection.set_debuglevel(1)
|
||||
self.url_connection.connect(self.urlparts[1])
|
||||
if _user is None:
|
||||
|
|
|
|||
|
|
@ -460,7 +460,7 @@ class HttpUrl (urlbase.UrlBase, proxysupport.ProxySupport):
|
|||
else:
|
||||
raise linkcheck.LinkCheckerError, \
|
||||
_("Unsupported HTTP url scheme %r") % scheme
|
||||
if self.consumer.config.get("debug"):
|
||||
if linkcheck.log.is_debug(linkcheck.LOG_CHECK):
|
||||
h.set_debuglevel(1)
|
||||
h.connect()
|
||||
return h
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ class MailtoUrl (urlbase.UrlBase):
|
|||
linkcheck.log.debug(linkcheck.LOG_CHECK,
|
||||
"SMTP check for %r (preference %d)", host, preference)
|
||||
self.url_connection = smtplib.SMTP()
|
||||
if self.consumer.config.get("debug"):
|
||||
if linkcheck.log.is_debug(linkcheck.LOG_CHECK):
|
||||
self.url_connection.set_debuglevel(1)
|
||||
self.url_connection.connect(host)
|
||||
linkcheck.log.debug(linkcheck.LOG_CHECK, "SMTP connected!")
|
||||
|
|
|
|||
Loading…
Reference in a new issue