Merge "Handle job or build is None in formatUrlPattern" into feature/zuulv3

This commit is contained in:
Jenkins 2017-06-06 18:07:13 +00:00 committed by Gerrit Code Review
commit 114474e38e
1 changed files with 2 additions and 2 deletions

View File

@ -1546,8 +1546,8 @@ class QueueItem(object):
# secrets, etc.
safe_change = self.change.getSafeAttributes()
safe_pipeline = self.pipeline.getSafeAttributes()
safe_job = job.getSafeAttributes()
safe_build = build.getSafeAttributes()
safe_job = job.getSafeAttributes() if job else {}
safe_build = build.getSafeAttributes() if build else {}
try:
url = url_pattern.format(change=safe_change,
pipeline=safe_pipeline,