Use find_candidate_files() to determine which candidates to validate

We have utils.find_candidate_files() which correctly detects the type of
election and returns the appropriate list of files.  Lets use that
so limit the CI checks we do.

Change-Id: I36ccfa82137d0f05a031ab2a50dd4eb87a32094b
This commit is contained in:
Tony Breeds 2018-09-05 12:09:46 +10:00
parent 8e35880b8a
commit 3efc347226
1 changed files with 1 additions and 3 deletions

View File

@ -15,7 +15,6 @@ from __future__ import print_function
from __future__ import unicode_literals
import argparse
import glob
import os
from openstack_election import check_candidacy
@ -100,8 +99,7 @@ def main():
projects = utils.get_projects(tag=args.tag, fallback_to_master=True)
for filepath in glob.glob(os.path.join(utils.CANDIDATE_PATH,
args.release, '*', '*')):
for filepath in utils.find_candidate_files(election=args.release):
candidate_ok = True
candidate_ok &= validate_filename(filepath)