Make musicbox config setting optional
This commit is contained in:
parent
5b7880936f
commit
f3275339c0
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user