from gitbuildsys.oscapi import OSC, ObsError, OSCError
from gitbuildsys.utils import Temp
+from repa.common import RepaException
+
OSCRC_TEMPLATE = """[general]
apiurl = %(apiurl)s
def get_projects(self, regexp=''):
"""List projects with attributes."""
- for project in core.meta_get_project_list(self.apiurl):
+ try:
+ projects = core.meta_get_project_list(self.apiurl)
+ except OSCError as err:
+ raise RepaException("cat't get list of projects from %s: %s" %
+ (self.apiurl, err))
+
+ for project in projects:
if regexp and not re.match(regexp, project):
continue
- yield project, self.get_description(project)
-
+ try:
+ yield project, self.get_description(project)
+ except OSCError as err:
+ raise RepaException("Can't get a description from %s: %s" %
+ (project, err))
def get_build_results(self, prj):
"""Get project build results."""