1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-06 08:59:08 +03:00

samba-tool: exit with non-zero status on dbcheck failure

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Andrew Tridgell
2011-06-17 14:40:48 +10:00
parent b07e4933b7
commit 0b3b7e3797

View File

@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
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)