script to modify arbitrary value in config.db

I created the following python script to modify an arbitrary value within the config.db file. However, it seems to not correctly work. The value gets changed albeit it doesn't register correctly in the web. I admit to not being a python scripter. :-) Where am I messed up?
TIA, John
#! /usr/bin/env /share/bin/python
import marshal import sys
def main(argv):
file='/usr/local/mailman/lists/' + argv[1] + '/config.db'
fp = open(file, 'r') dict = marshal.load(fp) fp.close(); oldval = dict[argv[2]] dict[argv[2]] = argv[3] print argv[2], ' was: >', oldval, '< now is: >', dict[argv[2]], '<' fp = open(file, 'w') marshal.dump(dict, fp) fp.close();
if __name__ == "__main__": raise SystemExit(main(sys.argv))
-- John C. Wingenbach Pliant Systems, Inc. Sr. Systems Administrator Work: (919) 405-4627 Fax: (919) 405-4544
participants (1)
-
John Wingenbach