X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fdbconn.py;h=e5d4049c3f833951519d72deee4131aee3144bfb;hb=3aa655a3111581af526137f5154a9c5b4c7d0dcf;hp=e611d47df2106e9a084d0951b9e9b3b44710e57b;hpb=39799e5acc0db0c864ebea1b38fc6c1e1a5cec25;p=dak.git diff --git a/daklib/dbconn.py b/daklib/dbconn.py index e611d47d..e5d4049c 100644 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -433,27 +433,6 @@ def get_architecture(architecture, session=None): __all__.append('get_architecture') -# TODO: should be removed because the implementation is too trivial -@session_wrapper -def get_architecture_suites(architecture, session=None): - """ - Returns list of Suite objects for given C{architecture} name - - @type architecture: str - @param architecture: Architecture name to search for - - @type session: Session - @param session: Optional SQL session object (a temporary one will be - generated if not supplied) - - @rtype: list - @return: list of Suite objects for the given name (may be empty) - """ - - return get_architecture(architecture, session).suites - -__all__.append('get_architecture_suites') - ################################################################################ class Archive(object): @@ -2690,7 +2669,8 @@ class DBConn(object): mapper(Component, self.tbl_component, properties = dict(component_id = self.tbl_component.c.id, - component_name = self.tbl_component.c.name), + component_name = self.tbl_component.c.name, + suites = relation(Suite, secondary=self.tbl_component_suite)), extension = validator) mapper(DBConfig, self.tbl_config,