Remove superfluous calls to matches()
Remove unnecessary calls to matches() and ensure that delete_job() is correctly passing the jobs_glob argument to the expandYaml() method call since it uses a string whereas update_job() is using a sequence of strings. Once the bug with how delete_job is calling expandYaml() is fixed, the subsequent call to matches() can be removed. Change-Id: Iaf1404e26691384fd1d55ea630457860cc1beff5
This commit is contained in:
parent
6c3cf55400
commit
c29066210c
@ -820,10 +820,8 @@ class Builder(object):
|
|||||||
def delete_job(self, jobs_glob, fn=None):
|
def delete_job(self, jobs_glob, fn=None):
|
||||||
if fn:
|
if fn:
|
||||||
self.load_files(fn)
|
self.load_files(fn)
|
||||||
self.parser.expandYaml(jobs_glob)
|
self.parser.expandYaml([jobs_glob])
|
||||||
jobs = [j['name']
|
jobs = [j['name'] for j in self.parser.jobs]
|
||||||
for j in self.parser.jobs
|
|
||||||
if matches(j['name'], [jobs_glob])]
|
|
||||||
else:
|
else:
|
||||||
jobs = [jobs_glob]
|
jobs = [jobs_glob]
|
||||||
|
|
||||||
@ -858,8 +856,6 @@ class Builder(object):
|
|||||||
raise
|
raise
|
||||||
|
|
||||||
for job in self.parser.xml_jobs:
|
for job in self.parser.xml_jobs:
|
||||||
if jobs_glob and not matches(job.name, jobs_glob):
|
|
||||||
continue
|
|
||||||
if output:
|
if output:
|
||||||
if hasattr(output, 'write'):
|
if hasattr(output, 'write'):
|
||||||
# `output` is a file-like object
|
# `output` is a file-like object
|
||||||
|
Loading…
x
Reference in New Issue
Block a user