Link to Alarm Clock: remove try/except from Alarm Clock detection

hope this won't cause any issues with broken config
This commit is contained in:
Davis Mosenkovs 2015-05-30 15:02:16 +03:00
parent 346a6a2e42
commit 4df4eb2733

View File

@ -41,17 +41,11 @@ class IndexHandler(tornado.web.RequestHandler):
'using %s', port)
ws_url = "ws://%s:%d/mopidy/ws" % (host, port)
alarmclock = False
try:
alarmclock = config['alarmclock']['enabled']
except:
pass
self.__dict = {
'version': MusicBoxExtension.version,
'musicbox': int(ext_config['musicbox'] or False),
'websocket_url': ws_url,
'alarmclock': int(alarmclock)
'alarmclock': int('alarmclock' in config and 'enabled' in config['alarmclock'] and config['alarmclock']['enabled'])
}
self.__path = path