diff options
Diffstat (limited to 'src/python')
-rw-r--r-- | src/python/pysss.c | 47 |
1 files changed, 6 insertions, 41 deletions
diff --git a/src/python/pysss.c b/src/python/pysss.c index 7c84c21e..bd6d16e3 100644 --- a/src/python/pysss.c +++ b/src/python/pysss.c @@ -385,27 +385,10 @@ static PyObject *py_sss_userdel(PySssLocalObject *self, } } - /* Delete the user within a transaction */ - start_transaction(tctx); - if (tctx->error != EOK) { - PyErr_SetSssError(tctx->error); - goto fail; - } - - ret = userdel(tctx, self->ev, - self->sysdb, tctx->handle, tctx->octx); + /* Delete the user */ + ret = userdel(tctx, self->sysdb, tctx->octx); if (ret != EOK) { - tctx->error = ret; - - /* cancel transaction */ - talloc_zfree(tctx->handle); - PyErr_SetSssError(tctx->error); - goto fail; - } - - end_transaction(tctx); - if (tctx->error) { - PyErr_SetSssError(tctx->error); + PyErr_SetSssError(ret); goto fail; } @@ -653,28 +636,10 @@ static PyObject *py_sss_groupdel(PySssLocalObject *self, tctx->octx->name = groupname; - /* Remove the group within a transaction */ - start_transaction(tctx); - if (tctx->error != EOK) { - PyErr_SetSssError(tctx->error); - goto fail; - } - - /* groupdel */ - ret = groupdel(tctx, self->ev, - self->sysdb, tctx->handle, tctx->octx); + /* Remove the group */ + ret = groupdel(tctx, self->sysdb, tctx->octx); if (ret != EOK) { - tctx->error = ret; - - /* cancel transaction */ - talloc_zfree(tctx->handle); - PyErr_SetSssError(tctx->error); - goto fail; - } - - end_transaction(tctx); - if (tctx->error) { - PyErr_SetSssError(tctx->error); + PyErr_SetSssError(ret); goto fail; } |