# Copyright 2004-2005 James Bunton <james@delx.cjb.net>
# Licensed for distribution under the GPL version 2, check COPYING for details
-from tlib import xmlw
+from twisted.words.xish.domish import parseFile
import sys, os
# Get ourself a DOM
try:
- root = xmlw.parseFile(configFile)
+ root = parseFile(configFile)
except Exception, e:
invalidError("Error parsing configuration file: " + str(e))
def importOptions(options):
for o in options:
if hasattr(config, o):
- setattr(config, o, options[0])
+ setattr(config, o, options[o])
else:
- print "Option %s is not a defined option. Ignoring!" % (tag)
+ print "Option %s is not a defined option. Ignoring!" % (o)
def reloadConfig(file=None, options=None):
if file: