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
This commit is contained in:
Winson Chan 2015-10-05 19:36:19 +00:00
parent f5f7cfd635
commit c55a035ffb

View File

@ -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()