Author: dmeyer
Date: Sun Oct 16 14:26:08 2005
New Revision: 7716
Modified:
trunk/freevo-core/src/cfgparse.py
Log:
make it possible to add a section
Modified: trunk/freevo-core/src/cfgparse.py
==============================================================================
--- trunk/freevo-core/src/cfgparse.py (original)
+++ trunk/freevo-core/src/cfgparse.py Sun Oct 16 14:26:08 2005
@@ -128,8 +128,7 @@
elif re_section.match(line):
current = re_section.match(line).groups()[0].strip()
if not self.__sections.has_key(current):
- s = Section(current, len(self.__sections), self.schema)
- self.__sections[current] = s
+ self.add_section(current)
current = self.__sections[current]
if comment:
current.comment = comment
@@ -142,7 +141,12 @@
f.close()
raise ParseError('invalid line %s in %s' % (lineno, filename))
f.close()
-
+
+
+ def add_section(self, name):
+ self.__sections[name] = Section(name, len(self.__sections),
self.schema)
+
+
def write(self, f):
sections = self.__sections.values()[:]
sections.sort(lambda x,y: cmp(x.pos, y.pos))
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog