Skip to content

Commit

Permalink
Merge pull request #300 from arnihermann/master
Browse files Browse the repository at this point in the history
Fix xunit plugin. Merging through github interface because the xunit plugin is known by not being so reliable so no test coverage is required
  • Loading branch information
gabrielfalcao committed Nov 23, 2012
2 parents 58bcd09 + f8f7251 commit 3398152
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lettuce/plugins/xunit_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ def create_test_case_step(step):
if step.failed:
cdata = doc.createCDATASection(step.why.traceback)
failure = doc.createElement("failure")
failure.setAttribute("message", step.why.cause)
if hasattr(step.why, 'cause'):
failure.setAttribute("message", step.why.cause)
failure.setAttribute("type", step.why.exception.__class__.__name__)
failure.appendChild(cdata)
tc.appendChild(failure)
Expand Down

0 comments on commit 3398152

Please sign in to comment.