Fix error in job parser

Change-Id: Id806d3648ad7464a2e6d1ae1235061f48014a49a
This commit is contained in:
James E. Blair 2017-10-18 15:53:32 -07:00
parent 4122b0b8f0
commit aa62ecad86
2 changed files with 7 additions and 3 deletions

View File

@ -17,8 +17,12 @@
jobs: jobs:
- test-autodoc - test-autodoc
- example - example
- does-not-exist-in-this-repo - does-not-exist-in-this-repo:
required-projects:
- some-project
gate: gate:
jobs: jobs:
- example - example
- does-not-exist-in-this-repo - does-not-exist-in-this-repo:
required-projects:
- some-project

View File

@ -43,7 +43,7 @@ class ProjectTemplate(object):
jobs = [] jobs = []
for job in v['jobs']: for job in v['jobs']:
if isinstance(job, dict): if isinstance(job, dict):
job = list(dict.keys())[0] job = list(job.keys())[0]
jobs.append(job) jobs.append(job)
if jobs: if jobs:
self.pipelines[k] = jobs self.pipelines[k] = jobs