* fix several component typos and small bugs, now I could test

* workaround: do not try to initialize members of an autoxml class
derived from xmlfile. turn off xmlfile_support for members, that is.
This commit is contained in:
Eray Özkural
2005-11-14 15:39:33 +00:00
parent 1fbcaef6f1
commit 405fbbdff6
4 changed files with 11 additions and 6 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ class ComponentDB(object):
return list
def add_component(self, component):
self.d[name] = component.name
self.d[component.name] = component
def add_package(self, component_name, package):
if not self.has_component(component_name):
+1 -1
View File
@@ -80,7 +80,7 @@ class Index(XmlFile):
pkgdb = packagedb.get_db(repo)
pkgdb.clear()
for comp in self.components:
compdb.add_component(pkg)
ctx.componentdb.add_component(comp)
for pkg in self.packages:
pkgdb.add_package(pkg)
+9 -3
View File
@@ -297,10 +297,16 @@ class autoxml(oo.autosuper, oo.autoprop):
# generate top-level helper functions
cls.initializers = inits
def initialize(self, **args):
if not args.has_key('tag'):
tag = cls.tag
if xmlfile_support:
XmlFile.__init__(self, tag = tag)
# totally dailywtf
#if args.has_key('tag'):
# tag = args['tag']
#else:
# tag = self.__class__.tag # ought to be autoxml
#XmlFile.__init__(self, tag = tag)
#workaround: init only top level xmlfile, not the parts
if not args.has_key('tag'):
XmlFile.__init__(self, tag = cls.tag)
for base in cls.autoxml_bases:
base.__init__(self)
#super(cls, self).__init__(tag = tag) cooperative shit disabled for now
-1
View File
@@ -61,7 +61,6 @@ class XmlFile(object):
def unlink(self):
"""deallocate DOM structure"""
del self.doc
#self.doc = None # why?
def rootNode(self):
"""returns root document element"""