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

'samba-tool gpo': Properly close transaction.

This commit is contained in:
Jelmer Vernooij
2012-02-25 17:50:14 +01:00
parent 08a3d6d6ad
commit 9ecc68abe7

View File

@ -916,11 +916,11 @@ class cmd_create(Command):
# Set ACL
conn.set_acl(sharepath, fs_sd)
self.samdb.transaction_commit()
except Exception, e:
except:
self.samdb.transaction_cancel()
raise RuntimeError("Error adding GPO to AD", e)
raise
else:
self.samdb.transaction_commit()
self.outf.write("GPO '%s' created as %s\n" % (displayname, gpo))