I've recently needed to use the tmda-address facility but I'm
getting errors about tmda not being able to find the crypt_key file.
I know that tmda is set up correctly because it all works except for
tmda-address. My datadir is not in ~/.tmda however so all tmda
commands get the config file argument added to them.
I had a quick look at the code and the problem is that although you
can pass a config file on the command line, the Defaults.py gets
imported before this gets set up so blows with an exception on line
1433.
Some of the options setup depend on Defaults so they need to be done
after the import, but most (or at least the --config-file arg) need to
be done before the import. Quick hack patch is:
--- tmda/bin/tmda-address 2003-01-03 00:47:47.000000000 +0000
+++ tmda-cvs/bin/tmda-address 2003-03-20 15:25:17.000000000 +0000
@@ -101,6 +101,10 @@
option = None
print_newline = 1
+for opt, arg in opts:
+ if opt in ('-c', '--config-file'):
+ os.environ['TMDARC'] = arg
+
from TMDA import Defaults
for opt, arg in opts:
@@ -112,8 +116,6 @@
if opt == '--version':
print Version.TMDA
sys.exit()
- elif opt in ('-c', '--config-file'):
- os.environ['TMDARC'] = arg
elif opt in ('-a', '--address'):
address = arg
elif opt in ('-d', '--dated'):
Marcus
--
Marcus Williams - http://www.onq2.com
Quintic Ltd, 39 Newnham Road, Cambridge, UK
_________________________________________________
tmda-workers mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-workers