Skip to content

Commit

Permalink
Fixes broken verify_reference_index
Browse files Browse the repository at this point in the history
  • Loading branch information
ask committed Nov 26, 2012
1 parent 8407b8f commit 26e44c8
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions extra/release/verify_config_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,25 @@
from celery.app.defaults import NAMESPACES, flatten

ignore = frozenset([
"CELERYD_POOL_PUTLOCKS",
"BROKER_HOST",
"BROKER_USER",
"BROKER_PASSWORD",
"BROKER_VHOST",
"BROKER_PORT",
"CELERY_REDIS_HOST",
"CELERY_REDIS_PORT",
"CELERY_REDIS_DB",
"CELERY_REDIS_PASSWORD",
'CELERYD_AGENT',
'CELERYD_POOL_PUTLOCKS',
'BROKER_HOST',
'BROKER_USER',
'BROKER_PASSWORD',
'BROKER_VHOST',
'BROKER_PORT',
'CELERY_REDIS_HOST',
'CELERY_REDIS_PORT',
'CELERY_REDIS_DB',
'CELERY_REDIS_PASSWORD',
])


def is_ignored(setting, option):
return setting in ignore or option.deprecate_by


def find_undocumented_settings(directive=".. setting:: "):
def find_undocumented_settings(directive='.. setting:: '):
settings = dict(flatten(NAMESPACES))
all = set(settings)
documented = set(line.strip()[len(directive):].strip()
Expand All @@ -33,12 +34,12 @@ def find_undocumented_settings(directive=".. setting:: "):
if not is_ignored(setting, settings[setting])]


if __name__ == "__main__":
sep = """\n * """
if __name__ == '__main__':
sep = '\n * '
missing = find_undocumented_settings()
if missing:
print("Error: found undocumented settings:{0}{1}".format(
sep, sep.join(sorted(missing))), file=sys.stderr)
print('Error: found undocumented settings:{0}{1}'.format(
sep, sep.join(sorted(missing))), file=stderr)
exit(1)
print("OK: Configuration reference complete :-)")
print('OK: Configuration reference complete :-)')
exit(0)

0 comments on commit 26e44c8

Please sign in to comment.