summaryrefslogtreecommitdiffstats
path: root/module/XMLConfigParser.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-04-29 20:26:18 +0200
committerGravatar mkaay <mkaay@mkaay.de> 2010-04-29 20:26:18 +0200
commit632fb7eb860675a0375b8e3a8669335ec97f6d81 (patch)
tree8b0cb62f009727b91923946e4e713017b739cea5 /module/XMLConfigParser.py
parentSome design modifications (diff)
downloadpyload-632fb7eb860675a0375b8e3a8669335ec97f6d81.tar.xz
fixed updater, moved config files, folder for each package now optional
Diffstat (limited to 'module/XMLConfigParser.py')
-rw-r--r--module/XMLConfigParser.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/module/XMLConfigParser.py b/module/XMLConfigParser.py
index 50214c49a..575dbd219 100644
--- a/module/XMLConfigParser.py
+++ b/module/XMLConfigParser.py
@@ -24,11 +24,14 @@ import re
from shutil import copy
class XMLConfigParser():
- def __init__(self, data, forceDefault=False):
+ def __init__(self, data, forceDefault=False, defaultFile=None):
self.xml = None
self.version = "0.1"
self.file = data
- self.file_default = self.file.replace(".xml", "_default.xml")
+ if defaultFile:
+ self.file_default = defaultFile
+ else:
+ self.file_default = self.file.replace(".xml", "_default.xml")
self.forceDefault = forceDefault
self.config = {}
self.data = {}
@@ -36,7 +39,7 @@ class XMLConfigParser():
self.loadData()
self.root = self.xml.documentElement
if not forceDefault:
- self.defaultParser = XMLConfigParser(data, True)
+ self.defaultParser = XMLConfigParser(data, True, defaultFile=defaultFile)
def loadData(self):
file = self.file