[SCM] Samba Shared Repository - branch master updated
Jelmer Vernooij
jelmer at samba.org
Mon Aug 1 17:42:03 MDT 2011
The branch, master has been updated
via 6eb496c dbcheck: Cancel transaction if operation fails.
from 0c67efd Fix bug 7462 - Non-standard SA_RESETHAND is used in ...lib/tevent/tevent_signal.c
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 6eb496cf45a193d0945a3b6a84af693c6f44d7b7
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Mon Aug 1 20:04:02 2011 +0200
dbcheck: Cancel transaction if operation fails.
Autobuild-User: Jelmer Vernooij <jelmer at samba.org>
Autobuild-Date: Tue Aug 2 01:41:07 CEST 2011 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
source4/scripting/python/samba/netcmd/dbcheck.py | 25 +++++++++++++--------
1 files changed, 15 insertions(+), 10 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/scripting/python/samba/netcmd/dbcheck.py b/source4/scripting/python/samba/netcmd/dbcheck.py
index 3f379c0..2a175f3 100644
--- a/source4/scripting/python/samba/netcmd/dbcheck.py
+++ b/source4/scripting/python/samba/netcmd/dbcheck.py
@@ -96,16 +96,21 @@ class cmd_dbcheck(Command):
if yes and fix:
samdb.transaction_start()
-
- chk = dbcheck(samdb, samdb_schema=samdb_schema, verbose=verbose, fix=fix, yes=yes, quiet=quiet)
-
- if reindex:
- print("Re-indexing...")
- error_count = 0
- if chk.reindex_database():
- print("completed re-index OK")
- else:
- error_count = chk.check_database(DN=DN, scope=search_scope, controls=controls, attrs=attrs)
+ try:
+ chk = dbcheck(samdb, samdb_schema=samdb_schema, verbose=verbose,
+ fix=fix, yes=yes, quiet=quiet)
+
+ if reindex:
+ print("Re-indexing...")
+ error_count = 0
+ if chk.reindex_database():
+ print("completed re-index OK")
+ else:
+ error_count = chk.check_database(DN=DN, scope=search_scope,
+ controls=controls, attrs=attrs)
+ except:
+ samdb.transaction_cancel()
+ raise
if yes and fix:
samdb.transaction_commit()
--
Samba Shared Repository
More information about the samba-cvs
mailing list