From eb0414e02c9a27f3efa59a784a18082e99b50484 Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Wed, 3 Feb 2010 19:43:45 +0100 Subject: [PATCH] console override ini --- gunicorn/main.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/gunicorn/main.py b/gunicorn/main.py index 876de2e4..13b99ba6 100644 --- a/gunicorn/main.py +++ b/gunicorn/main.py @@ -232,16 +232,15 @@ def run_paster(): else: workers = int(ctx.local_conf.get('workers', 1)) - 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 - - + if not opts.bind: + 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: