Browse Source

encode None as an empty string in setConf

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
d46220ec48
  1. 5
      pyweb/mumble/MumbleCtlIce.py

5
pyweb/mumble/MumbleCtlIce.py

@ -212,7 +212,8 @@ class MumbleCtlIce_118(MumbleCtlBase):
def setConf(self, srvid, key, value): def setConf(self, srvid, key, value):
if key == "username": if key == "username":
key = "playername"; key = "playername";
if value is None:
value = ''
self._getIceServerObject(srvid).setConf( key, value.encode( "UTF-8" ) ) self._getIceServerObject(srvid).setConf( key, value.encode( "UTF-8" ) )
@protectDjangoErrPage @protectDjangoErrPage
@ -421,6 +422,8 @@ class MumbleCtlIce_120(MumbleCtlIce_118):
@protectDjangoErrPage @protectDjangoErrPage
def setConf(self, srvid, key, value): def setConf(self, srvid, key, value):
if value is None:
value = ''
self._getIceServerObject(srvid).setConf( key, value.encode( "UTF-8" ) ) self._getIceServerObject(srvid).setConf( key, value.encode( "UTF-8" ) )
@protectDjangoErrPage @protectDjangoErrPage

Loading…
Cancel
Save