From 2e331cb59feda0f45a048980eb34a8efe6de72a8 Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Fri, 26 Feb 2010 11:37:12 +0100 Subject: [PATCH] fix quite a few typos and wrong copypasta that turned the Ctl to None... --- pyweb/mumble/MumbleCtlIce.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pyweb/mumble/MumbleCtlIce.py b/pyweb/mumble/MumbleCtlIce.py index 24a7e29..572872f 100644 --- a/pyweb/mumble/MumbleCtlIce.py +++ b/pyweb/mumble/MumbleCtlIce.py @@ -135,14 +135,17 @@ def MumbleCtlIce( connstring, slicefile=None, icesecret=None ): if murmurversion == (1, 1, 8): return MumbleCtlIce_118( connstring, meta ); - elif murmurversion[:2] == (1, 2) and murmurversion[:3] < 2: - return MumbleCtlIce_120( connstring, meta ); - - elif murmurversion[:3] == 2: - return MumbleCtlIce_122( connstring, meta ); + elif murmurversion[:2] == (1, 2): + if murmurversion[2] < 2: + return MumbleCtlIce_120( connstring, meta ); + + elif murmurversion[2] == 2: + return MumbleCtlIce_122( connstring, meta ); + + elif murmurversion[2] == 3: + return MumbleCtlIce_123( connstring, meta ); - elif murmurversion[:3] == 3: - return MumbleCtlIce_123( connstring, meta ); + raise NotImplementedError( "No ctl object available for Murmur version %d.%d.%d" % tuple(murmurversion) ) class MumbleCtlIce_118(MumbleCtlBase):