summaryrefslogtreecommitdiff
path: root/gitlab/cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/cli.py')
-rw-r--r--gitlab/cli.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gitlab/cli.py b/gitlab/cli.py
index 17917f5..5ca4568 100644
--- a/gitlab/cli.py
+++ b/gitlab/cli.py
@@ -136,9 +136,6 @@ def main():
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()
+ exit(0)
sys.exit(e)
cli_module = importlib.import_module('gitlab.v%s.cli' % config.api_version)