diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-06-20 11:59:49 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-06-20 11:59:49 +0200 |
commit | 66e27e5214180b473b848201d2dcc7ccc3ad2b04 (patch) | |
tree | f5efbd1be3bcf34a7d973cd25283948f21be7569 /source4/scripting | |
parent | 9bcd0daba2cdd2acd6fc0e3de44f5138f2f3303f (diff) | |
download | samba-66e27e5214180b473b848201d2dcc7ccc3ad2b04.tar.gz samba-66e27e5214180b473b848201d2dcc7ccc3ad2b04.tar.bz2 samba-66e27e5214180b473b848201d2dcc7ccc3ad2b04.zip |
Remove unnecessary use of transactions.
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/python/samba/samdb.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/source4/scripting/python/samba/samdb.py b/source4/scripting/python/samba/samdb.py index 0a3ca41604..23f33b6bc4 100644 --- a/source4/scripting/python/samba/samdb.py +++ b/source4/scripting/python/samba/samdb.py @@ -35,8 +35,8 @@ class SamDB(samba.Ldb): """The SAM database.""" def __init__(self, url=None, lp=None, modules_dir=None, session_info=None, - credentials=None, flags=0, options=None, global_schema=True, auto_connect=True, - am_rodc=False): + credentials=None, flags=0, options=None, global_schema=True, + auto_connect=True, am_rodc=False): self.lp = lp if not auto_connect: url = None @@ -141,14 +141,7 @@ pwdLastSet: 0 if notes is not None: ldbmessage["info"] = notes - self.transaction_start() - try: - self.add(ldbmessage) - except: - self.transaction_cancel() - raise - else: - self.transaction_commit() + self.add(ldbmessage) def deletegroup(self, groupname): """Deletes a group @@ -335,7 +328,6 @@ member: %s # Sets the password for it self.setpassword("(dn=" + user_dn + ")", password, force_password_change_at_next_login_req) - except: self.transaction_cancel() raise |