summaryrefslogtreecommitdiff
path: root/gitlab/cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/cli.py')
-rw-r--r--gitlab/cli.py5
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)]