config: Add core_defaults to config

This commit is contained in:
Thomas Adamcik 2013-04-15 22:26:45 +02:00
parent 51f89017fe
commit 611af060f6

View File

@ -12,6 +12,8 @@ from mopidy.utils import path
logger = logging.getLogger('mopdiy.config')
_config_dir = os.path.dirname(__file__)
_logging_schema = ConfigSchema('logging')
_logging_schema['console_format'] = String()
_logging_schema['debug_format'] = String()
@ -32,8 +34,12 @@ _proxy_schema['password'] = Secret(optional=True)
# NOTE: if multiple outputs ever comes something like LogLevelConfigSchema
#_outputs_schema = config.AudioOutputConfigSchema()
#: Config schemas used by mopidy itself.
core_schemas = [_logging_schema, _loglevels_schema, _audio_schema, _proxy_schema]
#: Config default used by mopidy itself.
core_defaults = io.open(os.path.join(_config_dir, 'default.conf'), 'rb').read()
def read(config_file):
"""Helper to load config defaults in same way across core and extensions"""