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): class Config(object):
DEFAULT_CONFIG_FILE = 'gunicorn.conf.py', DEFAULT_CONFIG_FILE = 'gunicorn.conf.py'
DEFAULTS = dict( DEFAULTS = dict(
backlog=2048, backlog=2048,

View File

@ -3,6 +3,7 @@
# 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 errno
import os import os
import tempfile import tempfile
@ -24,7 +25,7 @@ class Pidfile(object):
return path return path
raise RuntimeError("Already running on PID %s " \ raise RuntimeError("Already running on PID %s " \
"(or pid file '%s' is stale)" % (os.getpid(), path)) "(or pid file '%s' is stale)" % (os.getpid(), path))
if instane._pidfile: if instance._pidfile:
self.unlink_pidfile(instance, instance._pidfile) self.unlink_pidfile(instance, instance._pidfile)
# write pidfile # write pidfile