diff --git a/docs/changelog.rst b/docs/changelog.rst index 979a5a0c..ba00ed1f 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -29,6 +29,9 @@ Bug fix release. - MPD: Remove track comments from responses. They are not included by the original MPD server, and this works around :issue:`881`. (PR: :issue:`882`) +- HTTP: Errors while starting HTTP apps are logged instead of crashing the HTTP + server. (Fixes: :issue:`875`) + v0.19.4 (2014-09-01) ==================== diff --git a/mopidy/http/actor.py b/mopidy/http/actor.py index 57e2f46a..a61fc45c 100644 --- a/mopidy/http/actor.py +++ b/mopidy/http/actor.py @@ -129,11 +129,16 @@ class HttpServer(threading.Thread): def _get_app_request_handlers(self): result = [] for app in self.apps: + try: + request_handlers = app['factory'](self.config, self.core) + except Exception: + logger.exception('Loading %s failed.', app['name']) + continue + result.append(( r'/%s' % app['name'], handlers.AddSlashHandler )) - request_handlers = app['factory'](self.config, self.core) for handler in request_handlers: handler = list(handler) handler[0] = '/%s%s' % (app['name'], handler[0])