From f4fcf4550eddf5c897e432efbc3ef605d6a8a419 Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Sat, 24 Dec 2016 15:03:32 +0100 Subject: [CLI] ignore empty arguments Gitlab 8.15 doesn't appreciate arguments with None as value. This breaks the python-gitlab CLI. Fixes #199 --- gitlab/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gitlab/cli.py') 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)] -- cgit v1.2.1