diff options
author | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2016-01-10 18:21:46 +0100 |
---|---|---|
committer | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2016-01-10 18:21:46 +0100 |
commit | 1d7ebea727c2fa68135ef4290dfe51604d843688 (patch) | |
tree | bad1985ed2fd1d4196628e862643eb0870d18dc6 /gitlab/cli.py | |
parent | e5821e6a39344d545ac230ac6d868a8f0aaeb46b (diff) | |
download | gitlab-1d7ebea727c2fa68135ef4290dfe51604d843688.tar.gz |
Support deletion without getting the object first
Use this feature in the CLI to avoid an extra API call to the server.
Diffstat (limited to 'gitlab/cli.py')
-rw-r--r-- | gitlab/cli.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gitlab/cli.py b/gitlab/cli.py index 3882c19..c2b2fa5 100644 --- a/gitlab/cli.py +++ b/gitlab/cli.py @@ -188,9 +188,9 @@ def do_delete(cls, gl, what, args): if not cls.canDelete: _die("%s objects can't be deleted" % what) - o = do_get(cls, gl, what, args) + id = args.pop(cls.idAttr) try: - o.delete() + gl.delete(cls, id, **args) except Exception as e: _die("Impossible to destroy object (%s)" % str(e)) |