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:
calvin 2005-03-09 21:55:20 +00:00
parent 7563f0edf9
commit dc960185df
3 changed files with 3 additions and 3 deletions

View file

@ -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:

View file

@ -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

View file

@ -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!")