diff --git a/distil/api/app.py b/distil/api/app.py index 9f75069..c62d5bb 100644 --- a/distil/api/app.py +++ b/distil/api/app.py @@ -12,7 +12,6 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. - import flask from oslo_config import cfg @@ -24,7 +23,9 @@ from distil.utils import api CONF = cfg.CONF -def make_app(): +def make_app(args=None): + config.parse_args(args, 'distil-api') + app = flask.Flask(__name__) @app.route('/', methods=['GET']) diff --git a/distil/cmd/distil_api.py b/distil/cmd/distil_api.py index afe5e1f..3a5689c 100644 --- a/distil/cmd/distil_api.py +++ b/distil/cmd/distil_api.py @@ -41,9 +41,7 @@ class WritableLogger(object): def main(): - config.parse_args(sys.argv[1:], 'distil-api') - - application = app.make_app() + application = app.make_app(sys.argv[1:]) CONF.log_opt_values(LOG, logging.INFO) try: wsgi.server(eventlet.listen((CONF.host, CONF.port), backlog=500),