From 4df4eb27336791a70f23b7b0d07cf1fce91b688a Mon Sep 17 00:00:00 2001 From: Davis Mosenkovs Date: Sat, 30 May 2015 15:02:16 +0300 Subject: [PATCH] Link to Alarm Clock: remove try/except from Alarm Clock detection hope this won't cause any issues with broken config --- mopidy_musicbox_webclient/web.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/mopidy_musicbox_webclient/web.py b/mopidy_musicbox_webclient/web.py index 19664a0..80dd677 100644 --- a/mopidy_musicbox_webclient/web.py +++ b/mopidy_musicbox_webclient/web.py @@ -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