On Fri, Oct 27, 2006 at 01:22:24PM -0700, David Hoffman wrote:
>Is there a way to feed the variables for times and actions from the config
>file instead of having to modify the code? Is your "ACTION_EXPIRE_DATED ="
>being taken from the config file, or do you actually have that in the code
>block like shown below?
It will be taken from the config file. I just put it in there in the
example code because I needed to get something from somewhere. That
particular code will actually work. If you copy it into a file, and run it
like this:
./MultiExpire.py 32d
It will give an answer based on whatever ACTION_EXPIRED_DATED is
set to. I just put that variable directly in the file because I'm
not actually reading a config file, and I need to get that data
from somewhere.
When I modify tmda-rfilter, I'll use Defaults.ACTION_EXPIRED_DATED
which will be read from the TMDA config file.
>if the config file can have a line like:
>ACTION_EXPIRED_DATED = {'default':'confirm','1w': 'bounce','30d':
>'hold','1Y':'drop'}
Yes. Python will happily allow both formats.
Thanks for the feedback.
_________________________________________________
tmda-workers mailing list ([email protected])
http://tmda.net/lists/listinfo/tmda-workers