some fixes to config and pidfile

This commit is contained in:
benoitc 2010-03-11 13:53:10 +01:00
parent 7280ad20f8
commit f75a413773
2 changed files with 4 additions and 3 deletions

View File

@ -12,7 +12,7 @@ from gunicorn import util
class Config(object):
DEFAULT_CONFIG_FILE = 'gunicorn.conf.py',
DEFAULT_CONFIG_FILE = 'gunicorn.conf.py'
DEFAULTS = dict(
backlog=2048,
@ -42,7 +42,7 @@ class Config(object):
def __init__(self, cmdopts, path=None):
if not path:
self.config_file = os.path.join(os.getcwd(),
self.DEFAULT_CONFIG_FILE)
self.DEFAULT_CONFIG_FILE)
else:
self.config_file = os.path.abspath(os.path.normpath(path))
self.cmdopts = cmdopts

View File

@ -3,6 +3,7 @@
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
import errno
import os
import tempfile
@ -24,7 +25,7 @@ class Pidfile(object):
return path
raise RuntimeError("Already running on PID %s " \
"(or pid file '%s' is stale)" % (os.getpid(), path))
if instane._pidfile:
if instance._pidfile:
self.unlink_pidfile(instance, instance._pidfile)
# write pidfile