summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-06-17 14:40:48 +1000
committerAndrew Tridgell <tridge@samba.org>2011-06-17 15:25:42 +1000
commit0b3b7e3797a9aa0dc8f0922c8cd873b0f0b3231e (patch)
treef106294c738e84b7f6b3c61d54768280ccfabe11 /source4/scripting/python
parentb07e4933b7ed4b2452cfdd9d223eecb8c0b74fec (diff)
downloadsamba-0b3b7e3797a9aa0dc8f0922c8cd873b0f0b3231e.tar.gz
samba-0b3b7e3797a9aa0dc8f0922c8cd873b0f0b3231e.tar.bz2
samba-0b3b7e3797a9aa0dc8f0922c8cd873b0f0b3231e.zip
samba-tool: exit with non-zero status on dbcheck failure
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/netcmd/dbcheck.py4
1 files changed, 3 insertions, 1 deletions
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 <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)