mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-21 16:30:28 +00:00
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:
parent
5110b0e02d
commit
0ea778b6fd
1 changed files with 2 additions and 6 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue