Skip to content
This repository has been archived by the owner on May 24, 2018. It is now read-only.

Commit

Permalink
CDSK-928 - fix Failure.type by setup why.type with locate()
Browse files Browse the repository at this point in the history
  • Loading branch information
warcholprzemo committed May 4, 2018
1 parent ed375ba commit 48c6789
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions master/buildbot/process/buildstep.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# Copyright Buildbot Team Members

import re
from pydoc import locate

from zope.interface import implements
from twisted.internet import defer, error
Expand Down Expand Up @@ -797,19 +798,18 @@ def failed(self, why):
if why.check(BuildStepFailed):
self.finished(FAILURE)
return

klog.err_json(why, "BuildStep.failed; traceback follows")
results = EXCEPTION
try:
if self.progress:
self.progress.finish()
try:
if isinstance(why.type, str):
klog.err_json("Failure.type is string: [name: %s] [builder: %s] " %
(self.name, self.build))
why.type = locate(why.type) or why.type
self.addCompleteLog("err.text", why.getTraceback())
self.addHTMLLog("err.html", formatFailure(why))
except AttributeError:
klog.err_json(
Failure(), "DEBUG formatting exc. why.type: %s %s" % (why.type, type(why.type))
)
except Exception:
klog.err_json(Failure(), "error while formatting exceptions")

Expand Down

0 comments on commit 48c6789

Please sign in to comment.