fixed param issue with gunicorn in script generator

modified:   modules/django.py
This commit is contained in:
Ronny Abraham 2016-09-07 20:46:37 +03:00
parent cf2cc845bc
commit f54fbac637

View file

@ -359,13 +359,14 @@ def generate_scripts(template_name, make_copy=False):
@task
def generate(param=None, make_copy=False):
SCRIPT_LIST = ['settings', 'local', 'wsgi']
PARAM_LIST = SCRIPT_LIST + list('gunicorn')
PARAM_LIST = SCRIPT_LIST
PARAM_LIST.append('gunicorn')
make_copy = booleanize(make_copy)
if param and param not in PARAM_LIST:
err_msg = "You asked to generate a script that isn't available" \
"possible script values available: %s" % SCRIPT_LIST
err_msg = "You asked to generate %s, that value isn't available" \
" possible script values available: %s" % (param, PARAM_LIST)
import sys
sys.exit(err_msg)
@ -410,7 +411,7 @@ def generate_gunicorn(make_link=True):
'files')
build_path = os.path.join(
configuration.templates.gunicorn.path.dest,
configuration.templates.gunicorn.path.remote,
'build',
configuration.templates.gunicorn.conf.dst)