fix django extensions

This commit is contained in:
Benoit Chesneau 2010-02-15 15:48:02 +01:00
parent dabf3395aa
commit ec7614f50c

View File

@ -3,10 +3,10 @@
# This file is part of gunicorn released under the MIT license. # This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information. # See the NOTICE for more information.
import sys
from optparse import make_option from optparse import make_option
import sys
import os
import django import django
from django.core.management.base import BaseCommand, CommandError from django.core.management.base import BaseCommand, CommandError
@ -16,7 +16,7 @@ from django.core.servers.basehttp import AdminMediaHandler, WSGIServerException
from django.core.handlers.wsgi import WSGIHandler from django.core.handlers.wsgi import WSGIHandler
from gunicorn.arbiter import Arbiter from gunicorn.arbiter import Arbiter
from gunicorn.main import daemonize, UMASK from gunicorn.main import daemonize, UMASK, set_owner_process
from gunicorn.util import parse_address from gunicorn.util import parse_address
class Command(BaseCommand): class Command(BaseCommand):
@ -77,7 +77,7 @@ class Command(BaseCommand):
daemonize(umask) daemonize(umask)
else: else:
os.setpgrp() os.setpgrp()
set_owner_process(options.user, options.group) set_owner_process(options.get("user"), options.get("group"))
arbiter.run() arbiter.run()
except WSGIServerException, e: except WSGIServerException, e:
# Use helpful error messages instead of ugly tracebacks. # Use helpful error messages instead of ugly tracebacks.