diff options
-rw-r--r-- | source4/scripting/python/samba/netcmd/gpo.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/scripting/python/samba/netcmd/gpo.py b/source4/scripting/python/samba/netcmd/gpo.py index bd3480e053..94c70c6af3 100644 --- a/source4/scripting/python/samba/netcmd/gpo.py +++ b/source4/scripting/python/samba/netcmd/gpo.py @@ -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)) |