Commit 182e333a authored by Pierre-Yves Chibon's avatar Pierre-Yves Chibon

Fix the runserver script

- Fix setting the env variable
- Fix using the -c/--config argument, we need to set the env variable
  before we do the imports, otherwise that won't work
parent 6469eeca
......@@ -8,8 +8,6 @@ import argparse
import sys
import os
from pagure import APP
APP.debug = True
parser = argparse.ArgumentParser(
description='Run the packages2 app')
......@@ -36,6 +34,9 @@ if args.profile:
APP.wsgi_app = ProfilerMiddleware(APP.wsgi_app, restrictions=[30])
if args.config:
os.environ['PKGS_CONFIG'] = args.config
os.environ['PAGURE_CONFIG'] = args.config
from pagure import APP
APP.debug = True
APP.run(port=int(args.port))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment