Handle build_set being None for priority
There are flows where there is no build_set. In those cases, return a normal priority. Also fixes a pep8 error from a force-merge. Change-Id: I1c98508fe227f7f6aa1d0b2f7dcf270cecaa60d8
This commit is contained in:
parent
68d3ba566c
commit
b58820536f
|
@ -486,7 +486,7 @@ class JobParser(object):
|
|||
|
||||
job = model.Job(conf['name'])
|
||||
job.source_context = conf.get('_source_context')
|
||||
job.source_line = conf.get('_start_mark').line +1
|
||||
job.source_line = conf.get('_start_mark').line + 1
|
||||
|
||||
is_variant = layout.hasJob(conf['name'])
|
||||
if 'parent' in conf:
|
||||
|
|
|
@ -532,7 +532,11 @@ class NodeRequest(object):
|
|||
|
||||
@property
|
||||
def priority(self):
|
||||
return PRIORITY_MAP[self.build_set.item.pipeline.precedence]
|
||||
if self.build_set:
|
||||
precedence = self.build_set.item.pipeline.precedence
|
||||
else:
|
||||
precedence = PRECEDENCE_NORMAL
|
||||
return PRIORITY_MAP[precedence]
|
||||
|
||||
@property
|
||||
def fulfilled(self):
|
||||
|
|
Loading…
Reference in New Issue