From 1df1bca7b76efd5e4719e0b78292b0e8b0187b22 Mon Sep 17 00:00:00 2001 From: "Paul J. Davis" Date: Mon, 16 Aug 2010 10:45:05 -0400 Subject: [PATCH] Don't override the default bind address. An old default was overriding the config hierarchy. --- gunicorn/management/commands/run_gunicorn.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gunicorn/management/commands/run_gunicorn.py b/gunicorn/management/commands/run_gunicorn.py index 9e728bd2..8030a965 100644 --- a/gunicorn/management/commands/run_gunicorn.py +++ b/gunicorn/management/commands/run_gunicorn.py @@ -37,7 +37,7 @@ class Command(BaseCommand): help="Change worker group"), make_option('-n', '--name', dest='proc_name', help="Process name"), - make_option('--preload', dest='preload_app', action='store_true', default=False, + make_option('--preload', dest='preload_app', action='store_true', help="Load application code before the worker processes are forked.") ) help = "Starts a fully-functional Web server using gunicorn." @@ -46,11 +46,12 @@ class Command(BaseCommand): # Validation is called explicitly each time the server is reloaded. requires_model_validation = False - def handle(self, addrport='', *args, **options): + def handle(self, addrport=None, *args, **options): if args: raise CommandError('Usage is runserver %s' % self.args) - options['bind'] = addrport or '127.0.0.1' + if addrport: + options['bind'] = addrport options['default_proc_name'] = settings.SETTINGS_MODULE