FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[CLI] ignore empty arguments · python-gitlab/python-gitlab@f4fcf45 · GitHub

Repository navigation

Commit f4fcf45

Browse files
Gauvain Pocentek
committed
[CLI] ignore empty arguments
Gitlab 8.15 doesn't appreciate arguments with None as value. This breaks the python-gitlab CLI. Fixes #199
1 parent 35c6bbb commit f4fcf45

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎gitlab/cli.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,9 +511,12 @@ def main():
511511
what = arg.what
512512

513513
# Remove CLI behavior-related args
514-
for item in ("gitlab", "config_file", "verbose", "what", "action"):
514+
for item in ("gitlab", "config_file", "verbose", "what", "action",
515+
"version"):
515516
args.pop(item)
516517

518+
args = {k: v for k, v in args.items() if v is not None}
519+
517520
cls = None
518521
try:
519522
cls = gitlab.__dict__[_what_to_cls(what)]

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL