1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

python/tests/blackbox: check_exit_code() explains by default

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2018-10-24 17:49:00 +13:00 committed by Douglas Bagnall
parent ee4a33a4ff
commit c57f3794e2

View File

@ -413,6 +413,8 @@ class BlackboxTestCase(TestCaseInTempDir):
stdoutdata, stderrdata = p.communicate()
retcode = p.returncode
if retcode != expected:
if msg is None:
msg = "expected return code %s; got %s" % (expected, retcode)
raise BlackboxProcessError(retcode,
line,
stdoutdata,