debug fixes

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@732 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2003-01-08 09:27:15 +00:00
parent da86b44f6b
commit 6d40be35e2
2 changed files with 3 additions and 3 deletions

View file

@ -19,7 +19,7 @@ import urlparse, urllib, sys, time, re, httplib, robotparser
import Config, StringUtil, i18n
from debug import *
# XXX not dynamic
if DebugLevel > 0:
if get_debuglevel() > 0:
robotparser.debug = 1
from ProxyUrlData import ProxyUrlData
@ -241,7 +241,7 @@ class HttpUrlData (ProxyUrlData):
def _getHTTPObject (self, host):
h = httplib.HTTPConnection(host)
h.set_debuglevel(DebugLevel)
h.set_debuglevel(get_debuglevel())
h.connect()
return h

View file

@ -238,7 +238,7 @@ except getopt.error:
# set debug level as early as possible
for opt,arg in options:
if opt=="-D" or opt=="--debug":
linkcheck.Config.DebugLevel += 1
set_debuglevel(get_debuglevel()+1)
debug(BRING_IT_ON, "Python", sys.version, "on", sys.platform)
# read configuration from config files
config = linkcheck.Config.Configuration()