diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-03-30 16:27:09 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-03-30 16:41:54 +1100 |
commit | 21499a148e4b6600d13977eb97c1a77d9bf5fd4c (patch) | |
tree | 19ffdf0382094aea9dc1e6b1e041c9bc5d3fd76a /selftest | |
parent | 4f4adddb171af2fafe280be05fd144fc3ad01107 (diff) | |
download | samba-21499a148e4b6600d13977eb97c1a77d9bf5fd4c.tar.gz samba-21499a148e4b6600d13977eb97c1a77d9bf5fd4c.tar.bz2 samba-21499a148e4b6600d13977eb97c1a77d9bf5fd4c.zip |
selftest: reason may be None
jelmer, please check
Diffstat (limited to 'selftest')
-rwxr-xr-x | selftest/format-subunit | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/selftest/format-subunit b/selftest/format-subunit index 71fa018bae..3747082839 100755 --- a/selftest/format-subunit +++ b/selftest/format-subunit @@ -79,7 +79,7 @@ class PlainFormatter(object): if result in ("success", "xfail"): self.suites_ok+=1 else: - self.output_msg("ERROR: Testsuite[%s]\nREASON: %s\n" % (name, reason)) + self.output_msg("ERROR: Testsuite[%s]\nREASON: %s\n" % (name, reason or '')) self.suitesfailed.append(name) if self.immediate and not self.verbose: out += self.test_output[name] @@ -107,6 +107,8 @@ class PlainFormatter(object): 'success': '.'}.get(result, "?(%s)" % result)) return + if reason is None: + reason = '' reason = reason.strip() self.test_output[self.name] += "UNEXPECTED(%s): %s\nREASON: %s\n" % (result, testname, reason) |