diff options
author | Max Wittig <max.wittig@siemens.com> | 2019-03-07 09:17:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-07 09:17:12 +0100 |
commit | a6e10f957aeccd7a1fd4e769f7e3acf6e4683308 (patch) | |
tree | fc53aadf4d6cd7d767d3a0ca9875ecda8e17b94a /gitlab | |
parent | bc973d450114fcdb2fb8222ab598b5d932585064 (diff) | |
parent | 6fe2988dd050c05b17556cacac4e283fbf5242a8 (diff) | |
download | gitlab-a6e10f957aeccd7a1fd4e769f7e3acf6e4683308.tar.gz |
Merge pull request #732 from hakanf/master
Re-enable command specific help messages
Diffstat (limited to 'gitlab')
-rw-r--r-- | gitlab/cli.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gitlab/cli.py b/gitlab/cli.py index 17917f5..b573c7f 100644 --- a/gitlab/cli.py +++ b/gitlab/cli.py @@ -133,12 +133,9 @@ def _parse_value(v): def main(): if "--version" in sys.argv: print(gitlab.__version__) - exit(0) + sys.exit(0) parser = _get_base_parser(add_help=False) - if "--help" in sys.argv or "-h" in sys.argv: - parser.print_help() - exit(0) # This first parsing step is used to find the gitlab config to use, and # load the propermodule (v3 or v4) accordingly. At that point we don't have @@ -150,6 +147,9 @@ def main(): options.config_file ) except gitlab.config.ConfigError as e: + if "--help" in sys.argv or "-h" in sys.argv: + parser.print_help() + sys.exit(0) sys.exit(e) cli_module = importlib.import_module('gitlab.v%s.cli' % config.api_version) |