From d46220ec486b4fcb427271fc973c114f4242f512 Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Tue, 16 Feb 2010 20:06:59 +0100 Subject: [PATCH] encode None as an empty string in setConf --- pyweb/mumble/MumbleCtlIce.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyweb/mumble/MumbleCtlIce.py b/pyweb/mumble/MumbleCtlIce.py index 354228a..a8df6ab 100644 --- a/pyweb/mumble/MumbleCtlIce.py +++ b/pyweb/mumble/MumbleCtlIce.py @@ -212,7 +212,8 @@ class MumbleCtlIce_118(MumbleCtlBase): def setConf(self, srvid, key, value): if key == "username": key = "playername"; - + if value is None: + value = '' self._getIceServerObject(srvid).setConf( key, value.encode( "UTF-8" ) ) @protectDjangoErrPage @@ -421,6 +422,8 @@ class MumbleCtlIce_120(MumbleCtlIce_118): @protectDjangoErrPage def setConf(self, srvid, key, value): + if value is None: + value = '' self._getIceServerObject(srvid).setConf( key, value.encode( "UTF-8" ) ) @protectDjangoErrPage