reporters/wikilog: Avoid overwriting variable

The log boolean variable conflicted with log.err() calls, fix this
and avoid tracebacks.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2021-01-25 10:42:15 +00:00
parent 80eec53950
commit a304971d89

View File

@ -90,16 +90,16 @@ class WikiLog(service.BuildbotService):
# Only run the logging code for builds in the monitored_parents list, or builds with # Only run the logging code for builds in the monitored_parents list, or builds with
# failures (to try and cut down on wiki noise) # failures (to try and cut down on wiki noise)
log = False havelog = False
headerpresent = False headerpresent = False
if build['results'] in [FAILURE, EXCEPTION, WARNINGS]: if build['results'] in [FAILURE, EXCEPTION, WARNINGS]:
log = True havelog = True
if (parent and parent['builder']['name'] in monitored_parents) or \ if (parent and parent['builder']['name'] in monitored_parents) or \
(build['builder']['name'] in monitored_parents): (build['builder']['name'] in monitored_parents):
log = True havelog = True
headerpresent = True headerpresent = True
if not log: if not havelog:
return return
if not headerpresent: if not headerpresent: