diff options
author | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2015-12-31 06:37:44 +0100 |
---|---|---|
committer | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2015-12-31 06:37:44 +0100 |
commit | a636d5ab25d2b248d89363ac86ecad7a0b90f100 (patch) | |
tree | 94fad92df0571ddeadbd1dda7dfa166861c7e54b /gitlab/cli.py | |
parent | 7e61a28d74a8589bffcfb70e0f3622113f6442ae (diff) | |
download | gitlab-a636d5ab25d2b248d89363ac86ecad7a0b90f100.tar.gz |
Provide a create method for GitlabObject's
Instead of using the constructor to do everything (get, list and
create), we now provide a class method for each action. This should make
code easier to read.
Diffstat (limited to 'gitlab/cli.py')
-rw-r--r-- | gitlab/cli.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gitlab/cli.py b/gitlab/cli.py index c3289df..2874a5f 100644 --- a/gitlab/cli.py +++ b/gitlab/cli.py @@ -149,8 +149,7 @@ def do_create(cls, gl, what, args): die("%s objects can't be created" % what) try: - o = cls(gl, args) - o.save() + o = cls.create(gl, args) except Exception as e: die("Impossible to create object (%s)" % str(e)) |