[spambayes-dev] Error with 1.1a4
Dag Nygren
dag at newtech.fi
Fri Mar 14 22:43:43 CET 2008
Hi there,
Just upgraded my system to use:
Python 2.4.4
gdbm 1.8.3
and spambayes 1.1a4
This started generating error messages during
the procmail check with the text:
Exception gdbm.error: "Reader can't store" in <bound method HammieFilter.close
of <__main__.HammieFilter object at 0x2b71a4221650>> ignored
The training seemed to work, but I don't like superfluous
error messages and checked out what the problem was.
Finally found that the close in hammie.py would call a
self.store always. During a check the database was opened
in read mode and the store will of course not work.
My fast fix was to pass the mode parameter to the Hammie class
in the __init__ and then not do the store if the mode was
"r".
The extra init parameter, because I haven't been using python
at all and found no way to check the hamie file for
readonly mode. Don't really like changing the API
of the Hammie class though
My question noe is:
Do you out there have a better solution?
Best
Dag
More information about the spambayes-dev
mailing list