def get_union_component(self, component_name): component = pisi.component.Component() component.parse(self.cdb.get_item(component_name)) for repo in self.repodb.list_repos(): try: component.packages.extend(self.cpdb.get_item(component_name, repo)) component.sources.extend(self.csdb.get_item(component_name, repo)) except Exception: #FIXME: what exception could we catch here, replace with that. pass return component
def get_component(self, component_name, repo = None): if not self.has_component(component_name, repo): raise Exception(_('Component %s not found') % component_name) component = pisi.component.Component() component.parse(self.cdb.get_item(component_name, repo)) try: component.packages = self.cpdb.get_item(component_name, repo) component.sources = self.csdb.get_item(component_name, repo) except Exception: #FIXME: what exception could we catch here, replace with that. pass return component
def get_component(self, component_name, repo=None): if not self.has_component(component_name, repo): raise Exception(_('Component %s not found') % component_name) component = pisi.component.Component() component.parse(self.cdb.get_item(component_name, repo)) try: component.packages = self.cpdb.get_item(component_name, repo) except Exception: #FIXME: what exception could we catch here, replace with that. pass try: component.sources = self.csdb.get_item(component_name, repo) except Exception: #FIXME: what exception could we catch here, replace with that. pass return component
def get_union_component(self, component_name): component = pisi.component.Component() component.parse(self.cdb.get_item(component_name)) for repo in pisi.db.repodb.RepoDB().list_repos(): try: component.packages.extend( self.cpdb.get_item(component_name, repo)) except Exception: #FIXME: what exception could we catch here, replace with that. pass try: component.sources.extend( self.csdb.get_item(component_name, repo)) except Exception: #FIXME: what exception could we catch here, replace with that. pass return component