From 0b3b7e3797a9aa0dc8f0922c8cd873b0f0b3231e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 17 Jun 2011 14:40:48 +1000 Subject: samba-tool: exit with non-zero status on dbcheck failure Pair-Programmed-With: Andrew Bartlett --- source4/scripting/python/samba/netcmd/dbcheck.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/scripting/python/samba/netcmd/dbcheck.py b/source4/scripting/python/samba/netcmd/dbcheck.py index 9f12136de8..b0d77f2fd9 100644 --- a/source4/scripting/python/samba/netcmd/dbcheck.py +++ b/source4/scripting/python/samba/netcmd/dbcheck.py @@ -18,7 +18,7 @@ # along with this program. If not, see . # -import samba, ldb +import samba, ldb, sys import samba.getopt as options from samba.auth import system_session from samba.samdb import SamDB @@ -178,3 +178,5 @@ class cmd_dbcheck(Command): if error_count != 0 and not self.fix: print("Please use --fix to fix these errors") print('Checked %u objects (%u errors)' % (len(res), error_count)) + if error_count != 0: + sys.exit(1) -- cgit