def get(option, silent): "Get a configuration option." from django.conf import settings from sentry.options import default_manager as manager from sentry.options.manager import UnknownOption try: key = manager.lookup_key(option) except UnknownOption: raise click.ClickException('unknown option: %s' % option) value = manager.get(key.name) if silent: click.echo(value) return # TODO(mattrobenolt): Add help to option keys # if key.help: # click.echo(key.help + '\n') click.echo(' from config: %s' % settings.SENTRY_OPTIONS.get(key.name, '<not set>')) click.echo(' current: %s' % value)