Exemple #1
0
 def __init__(self, conn, path='/'):
     Element.__init__(self, 'paelladatabase')
     self.conn = conn
     self.stmt = StatementCursor(self.conn)
     self._profile_traits_ = ProfileTrait(self.conn)
     self.path = path
     self.suites = SuitesElement()
     self.appendChild(self.suites)
     for row in self._suite_rows():
         args = map(str, [row.suite, row.nonus, row.updates, row.local, row.common])
         element = SuiteElement(*args)
         self.suites.appendChild(element)
     self.profiles = PaellaProfiles(self.conn)
     self.family = Family(self.conn)
     suites = [x.suite for x in self._suite_rows()]
     for suite in suites:
         self.appendChild(TraitsElement(self.conn, suite))
Exemple #2
0
 def append_suite(self, suite):
     element = SuiteElement(suite)
     self.suites[suite] = element
     self.suites_element.appendChild(element)