[prev in list] [next in list] [prev in thread] [next in thread] 

List:       spambayes-dev
Subject:    [spambayes-dev] Error with 1.1a4
From:       dag () newtech ! fi (Dag Nygren)
Date:       2008-03-14 21:43:43
Message-ID: 20080314214343.5E13710088 () mail ! newtech ! fi
[Download RAW message or body]


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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic