Stephen Warren <[EMAIL PROTECTED]> wrote on tmda-users: > I've attached a patch (against today's release-1-1 branch in CVS) > that does two things:
I'm moving this discussion to tmda-workers. See http://tmda.net/unstable/download.html#branches http://wiki.tmda.net/index.cgi/TmdaPatchSubmissions > If variables named in _path_vars aren't defined at all, Defaults.py > would throw an exception. This is fixed by the following snippet: Nice catch, thanks. > I'm only using TMDA-1.1 on a test user at present, so I have 1.0 and > 1.1 installed. I (may) need two different configuration files for > these versions. This patch takes the values of GLOBAL_TMDARC and > TMDARC and attempts to look for versions suffixed with the TMDA > branch number (e.g. "1.1") or falls back to the existing name if > that isn't found. > > That way, I can have: > > /etc/tmdarc-1.1 > /etc/tmdarc (for 1.0 - still used for 1.1 if above not present) Hmm. This seems like overkill to me. There are ways to handle multiple versions with one config file. For example, in config: from TMDA.Version import TMDA as tmda_version if tmda_version > '1.1': # your 1.1.x-only vars here Most users are only going to be running one or the other anyway. Another option might be to add a '-g' command-line option to tmda-filter similar to '-c' that overrides the standard location of the global config file in /etc/tmdarc. > Also, if TMDARC is set during parsing of GLOBAL_TMDARC, the TMDARC > value is not always over-written by reading from the environment, > hence allowing GLOBAL_TMDARC to specify the name of TMDARC. Good one, thanks. _________________________________________________ tmda-workers mailing list ([EMAIL PROTECTED]) http://tmda.net/lists/listinfo/tmda-workers
