Skip to content

Commit

Permalink
Merge pull request #36 from nathan-weinberg/working
Browse files Browse the repository at this point in the history
Some additional minor cleanup
  • Loading branch information
nathan-weinberg authored Feb 27, 2020
2 parents e84502f + 6c8211e commit 23e84a6
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,26 +186,25 @@ def percent(part, whole):
# fetch all relevant jobs
jobs = get_jenkins_jobs(server, config['job_search_fields'])

# initialize python variables
# exit if no jobs found
num_jobs = len(jobs)
if num_jobs == 0:
print("No jobs found with given search field. Exiting...")
sys.exit()

# iterate through all relevant jobs and build report rows
num_success = 0
num_unstable = 0
num_failure = 0
num_error = 0
rows = []

# exit if no jobs found
if num_jobs == 0:
print("No jobs found with given search field. Exiting...")
sys.exit()

# iterate through all relevant jobs
for job in jobs[::-1]:
job_name = job['name']
osp_version = get_osp_version(job_name)

# skip if no OSP version could be found
if osp_version == None:
print('No OSP version could be found in job {}. Skipping...'.format(job_name))
continue

# get all relevant info from jenkins
Expand Down

0 comments on commit 23e84a6

Please sign in to comment.