From bfbac6fa4cb25960c599f6a10b86378dff5fd134 Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Wed, 3 Feb 2010 19:41:14 +0100 Subject: [PATCH] fix gunicorn_paster --- gunicorn/main.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/gunicorn/main.py b/gunicorn/main.py index 1e394a41..876de2e4 100644 --- a/gunicorn/main.py +++ b/gunicorn/main.py @@ -231,11 +231,18 @@ def run_paster(): workers = opts.workers else: workers = int(ctx.local_conf.get('workers', 1)) - - host = opts.host or ctx.local_conf.get('host', '127.0.0.1') - port = opts.port or int(ctx.local_conf.get('port', 8000)) - bind = "%s:%s" % (host, port) - + + host = ctx.local_conf.get('host') + port = ctx.local_conf.get('port') + if host: + if port: + bind = "%s:%s" % (host, port) + else: + bind = host + opts.bind = bind + + + debug = ctx.global_conf.get('debug') == "true" if debug: # we force to one worker in debug mode.