From 632fb7eb860675a0375b8e3a8669335ec97f6d81 Mon Sep 17 00:00:00 2001 From: mkaay Date: Thu, 29 Apr 2010 20:26:18 +0200 Subject: fixed updater, moved config files, folder for each package now optional --- module/XMLConfigParser.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'module/XMLConfigParser.py') 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 -- cgit v1.2.3