summaryrefslogtreecommitdiff
path: root/gitlab/cli.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2016-01-10 18:21:46 +0100
committerGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2016-01-10 18:21:46 +0100
commit1d7ebea727c2fa68135ef4290dfe51604d843688 (patch)
treebad1985ed2fd1d4196628e862643eb0870d18dc6 /gitlab/cli.py
parente5821e6a39344d545ac230ac6d868a8f0aaeb46b (diff)
downloadgitlab-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.py4
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))