]> code.delx.au - pymsnt/blobdiff - src/xmlconfig.py
Recursively ignore *.pyc
[pymsnt] / src / xmlconfig.py
index e8758b529edfe81e6c2a6433dd5d8c438dc419ca..7b0e1dd105252620240f606d368b98defd540a92 100644 (file)
@@ -1,7 +1,7 @@
 # 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
 
@@ -23,7 +23,7 @@ def importFile(configFile):
 
        # Get ourself a DOM
        try:
-               root = xmlw.parseFile(configFile)
+               root = parseFile(configFile)
        except Exception, e:
                invalidError("Error parsing configuration file: " + str(e))
 
@@ -59,9 +59,9 @@ def importFile(configFile):
 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: