Commit 0dcb38f3 authored by Pierre-Yves Chibon's avatar Pierre-Yves Chibon

Allow pointing the config file to a file relative to the runserver script

parent be7d4c16
......@@ -36,7 +36,11 @@ if args.profile:
APP.wsgi_app = ProfilerMiddleware(APP.wsgi_app, restrictions=[30])
if args.config:
os.environ['PAGURE_CONFIG'] = args.config
config = args.config
if not config.startswith('/'):
here = os.path.join(os.path.dirname(os.path.abspath(__file__)))
config = os.path.join(here, config)
os.environ['PAGURE_CONFIG'] = config
APP.debug = True
APP.run(host='0.0.0.0', 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