From 182e333a42f527f201dd1a3225e0fc9808d7338d Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Oct 12 2015 09:41:21 +0000 Subject: 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 --- diff --git a/runserver.py b/runserver.py index dc2c207..71fc5b3 100755 --- a/runserver.py +++ b/runserver.py @@ -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))