From c55a035ffb83283c90914539eefee7dd71abbd40 Mon Sep 17 00:00:00 2001 From: Winson Chan Date: Mon, 5 Oct 2015 19:36:19 +0000 Subject: [PATCH] Fix argparse error in wsgi script In mistral/api/wsgi.py script, config.parse_args is called. By default, oslo.config parses the CLI args if no args is provided. As a result, invoking the WSGI script from gunicorn leads to the error with argparse complaining that the CLI options have already been parsed. Change-Id: Ib04325ae61759f4fc926f107f98a4eae82aec550 Closes-Bug: #1503014 --- mistral/api/wsgi.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mistral/api/wsgi.py b/mistral/api/wsgi.py index f387f7fe..0374aba8 100644 --- a/mistral/api/wsgi.py +++ b/mistral/api/wsgi.py @@ -15,5 +15,9 @@ from mistral.api import app from mistral import config -config.parse_args() +# By default, oslo.config parses the CLI args if no args is provided. +# As a result, invoking this wsgi script from gunicorn leads to the error +# with argparse complaining that the CLI options have already been parsed. +config.parse_args(args=[]) + application = app.setup_app()