From 6fa48b95ac45410add823bbddfa87d4dd5099555 Mon Sep 17 00:00:00 2001 From: benoitc Date: Mon, 23 Aug 2010 11:17:58 +0200 Subject: [PATCH] ignore some settings when needed --- gunicorn/config.py | 5 ++++- gunicorn/management/commands/run_gunicorn.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gunicorn/config.py b/gunicorn/config.py index 25e8840c..c8120ff1 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -22,10 +22,13 @@ def wrap_method(func): return func(*args, **kwargs) return _wrapped -def make_settings(): +def make_settings(ignore=None): settings = {} + ignore = ignore or () for s in KNOWN_SETTINGS: setting = s() + if setting.name in ignore: + continue settings[setting.name] = setting.copy() return settings diff --git a/gunicorn/management/commands/run_gunicorn.py b/gunicorn/management/commands/run_gunicorn.py index 2494e8cc..5cd04d45 100644 --- a/gunicorn/management/commands/run_gunicorn.py +++ b/gunicorn/management/commands/run_gunicorn.py @@ -16,7 +16,7 @@ from gunicorn.app.djangoapp import DjangoApplicationCommand from gunicorn.config import make_settings def make_options(): - g_settings = make_settings() + g_settings = make_settings(ignore=("version")) keys = g_settings.keys() def sorter(k):