From 71763873e36448378f69369d649e0449e4619191 Mon Sep 17 00:00:00 2001 From: Max Lin Date: Wed, 4 Jul 2018 18:38:47 +0800 Subject: [PATCH] stagingapi: remove staging_walk() function DVD subproject has been obsoleted, no need to check :DVD anymore. --- osclib/stagingapi.py | 5 ----- repo_checker.py | 19 ++++++++----------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/osclib/stagingapi.py b/osclib/stagingapi.py index 429257c1..a91d402a 100644 --- a/osclib/stagingapi.py +++ b/osclib/stagingapi.py @@ -981,11 +981,6 @@ class StagingAPI(object): return log.getvalue() - def staging_walk(self, staging): - yield staging - if len(self.cstaging_dvd_archs) and not self.is_adi_project(staging): - yield staging + ':DVD' - @memoize(session=True) def project_status(self, staging=None, aggregate=False): path = ('project', 'staging_projects', self.project) diff --git a/repo_checker.py b/repo_checker.py index 1a3c5c64..f589f70f 100755 --- a/repo_checker.py +++ b/repo_checker.py @@ -183,9 +183,8 @@ class RepoChecker(ReviewBot.ReviewBot): if group not in self.groups_build: # Generate build hash based on hashes from relevant projects. builds = [] - for staging in api.staging_walk(group): - builds.append(ET.fromstringlist(show_results_meta( - self.apiurl, staging, multibuild=True, repository=['standard'])).get('state')) + builds.append(ET.fromstringlist(show_results_meta( + self.apiurl, group, multibuild=True, repository=['standard'])).get('state')) builds.append(ET.fromstringlist(show_results_meta( self.apiurl, api.project, multibuild=True, repository=['standard'])).get('state')) @@ -247,14 +246,12 @@ class RepoChecker(ReviewBot.ReviewBot): directories = [] ignore = set() - for staging in self.staging_api(project).staging_walk(group): - if arch not in self.target_archs(staging): - self.logger.debug('{}/{} not available'.format(staging, arch)) - continue - - stagings.append(staging) - directories.append(self.mirror(staging, arch)) - ignore.update(self.ignore_from_staging(project, staging, arch)) + if arch not in self.target_archs(group): + self.logger.debug('{}/{} not available'.format(group, arch)) + else: + stagings.append(group) + directories.append(self.mirror(group, arch)) + ignore.update(self.ignore_from_staging(project, group, arch)) if not len(stagings): continue