From 49d62aecab3d860dfad048b3683d3cbe5795681f Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sat, 19 Mar 2011 15:55:25 +0100 Subject: [PATCH] Do not give MpdDispatcher an MpdSession object yet, as it is not needed to get current tests passing --- mopidy/frontends/mpd/dispatcher.py | 4 +--- mopidy/frontends/mpd/session.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mopidy/frontends/mpd/dispatcher.py b/mopidy/frontends/mpd/dispatcher.py index b934070e..c1249028 100644 --- a/mopidy/frontends/mpd/dispatcher.py +++ b/mopidy/frontends/mpd/dispatcher.py @@ -24,9 +24,7 @@ class MpdDispatcher(object): # XXX Consider merging MpdDispatcher into MpdSession - def __init__(self, session): - self.session = session - + def __init__(self): backend_refs = ActorRegistry.get_by_class(Backend) assert len(backend_refs) == 1, 'Expected exactly one running backend.' self.backend = backend_refs[0].proxy() diff --git a/mopidy/frontends/mpd/session.py b/mopidy/frontends/mpd/session.py index eb8c4f11..78e6f624 100644 --- a/mopidy/frontends/mpd/session.py +++ b/mopidy/frontends/mpd/session.py @@ -23,7 +23,7 @@ class MpdSession(asynchat.async_chat): self.input_buffer = [] self.authenticated = False self.set_terminator(LINE_TERMINATOR.encode(ENCODING)) - self.dispatcher = MpdDispatcher(self) + self.dispatcher = MpdDispatcher() def start(self): """Start a new client session."""