From 8041f921ad473c438eb5a5987fdb03333f1c5692 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Tue, 1 Jul 2014 23:22:52 +0200 Subject: [PATCH] http: Style tweaks --- mopidy/http/actor.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mopidy/http/actor.py b/mopidy/http/actor.py index f869fd5a..484fc946 100644 --- a/mopidy/http/actor.py +++ b/mopidy/http/actor.py @@ -63,19 +63,18 @@ class HttpFrontend(pykka.ThreadingActor, CoreListener): handlers.WebSocketHandler.broadcast(message) def _get_request_handlers(self): - static_dir = self.config['http']['static_dir'] request_handlers = [] request_handlers.extend(self._get_app_request_handlers()) request_handlers.extend(self._get_static_request_handlers()) # Either default Mopidy or user defined path to files - if (static_dir and not os.path.exists(static_dir)): + static_dir = self.config['http']['static_dir'] + if static_dir and not os.path.exists(static_dir): logger.warning( - 'Configured http/static_dir does not exist: %s\n' - ' Falling back to default http handler', static_dir) + 'Configured http/static_dir %s does not exist. ' + 'Falling back to default HTTP handler.', static_dir) static_dir = None - if static_dir: request_handlers.append((r'/(.*)', handlers.StaticFileHandler, { 'path': self.config['http']['static_dir'],