diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2016-12-24 15:03:32 +0100 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2016-12-24 15:03:32 +0100 |
commit | f4fcf4550eddf5c897e432efbc3ef605d6a8a419 (patch) | |
tree | afad0f37504aba71dd0d2a62ebbf4180ec0b7d86 /gitlab/cli.py | |
parent | 35c6bbb9dfaa49d0f080991a41eafc9dccb2e9f8 (diff) | |
download | gitlab-f4fcf4550eddf5c897e432efbc3ef605d6a8a419.tar.gz |
[CLI] ignore empty arguments
Gitlab 8.15 doesn't appreciate arguments with None as value. This breaks
the python-gitlab CLI.
Fixes #199
Diffstat (limited to 'gitlab/cli.py')
-rw-r--r-- | gitlab/cli.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gitlab/cli.py b/gitlab/cli.py index ec4274d..3a80bbc 100644 --- a/gitlab/cli.py +++ b/gitlab/cli.py @@ -511,9 +511,12 @@ def main(): what = arg.what # Remove CLI behavior-related args - for item in ("gitlab", "config_file", "verbose", "what", "action"): + for item in ("gitlab", "config_file", "verbose", "what", "action", + "version"): args.pop(item) + args = {k: v for k, v in args.items() if v is not None} + cls = None try: cls = gitlab.__dict__[_what_to_cls(what)] |