Make musicbox config setting optional

This commit is contained in:
Nick Steel 2015-04-26 00:50:40 +01:00
parent 5b7880936f
commit f3275339c0
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ class MusicBoxExtension(ext.Extension):
def get_config_schema(self):
schema = super(MusicBoxExtension, self).get_config_schema()
schema['musicbox'] = config.Boolean()
schema['musicbox'] = config.Boolean(optional=True)
schema['websocket_host'] = config.Hostname(optional=True)
schema['websocket_port'] = config.Port(optional=True)
return schema

View File

@ -44,7 +44,7 @@ class IndexHandler(tornado.web.RequestHandler):
self.__dict = {
'version': MusicBoxExtension.version,
'musicbox': int(ext_config['musicbox']),
'musicbox': int(ext_config['musicbox'] or False),
'websocket_url': ws_url
}
self.__path = path