dont trace with log function, else a deadlock occurs

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2599 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2005-05-17 21:49:09 +00:00
parent 5110b0e02d
commit 0ea778b6fd

View file

@ -36,14 +36,10 @@ import sys
# call tracing
tracelog = None
def trace (log):
def trace ():
"""
Start tracing of the current thread (and the current thread only).
"""
global tracelog
if tracelog is None:
tracelog = log
sys.settrace(_traceit)
@ -58,7 +54,7 @@ def _traceit (frame, event, arg):
filename = filename[:-1]
name = frame.f_globals["__name__"]
line = linecache.getline(filename, lineno)
info(tracelog, "%s:%s: %s", name, lineno, line.rstrip())
print "TRACE %s:%d: %s" % (name, lineno, line.rstrip())
return _traceit