[Spambayes] New web training interface for pop3proxy
Sun Nov 24 17:35:07 2002
Richie Hindle <firstname.lastname@example.org> writes:
> Um? That code says:
>> if record is None:
>> record = self.WordInfoClass(now)
>> if is_spam:
>> record.spamcount += 1
>> record.hamcount += 1
>> # Needed to tell a persistent DB that the content changed.
>> wordinfo[word] = record
> So by the time it gets to the offending line, record can't be None...
Hmm. I just did some tracing by using Python's trace hooks (neat
trick, although it does produce a lot of output...) It stops in
hammie.py at line 130, which is in DBDict.__setitem__ doing
self.hash[key] = v. That's mildly worrying, as it sort of implies that
the lockup is in the DBM C extension. (If any more Python code was
being called, I'd expect to see trace output).
Any DBM experts in the house?
PS The tracing code I used was as follows. It's quite a neat trick, as
it doesn't need any changes to the source at all - and by playing
with the trace hook, you can even dump local variable values if you
def tracer(frame, event, arg):
if event == 'call':
if event == 'line':
print frame.f_code.co_filename, frame.f_lineno
sys.argv = ["pop3proxy.py", "-d", "-l", "8110", "localhost"]
This signature intentionally left blank
More information about the Spambayes