From 8380cd6c2fc34f5998c08cb588f8701b8f0e61d9 Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Thu, 9 Apr 2009 14:22:51 +0200 Subject: [PATCH] updated to replace "" with noname in the RegistrationName --- pyweb/mumble/management.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pyweb/mumble/management.py b/pyweb/mumble/management.py index a3882b8..ace21d6 100644 --- a/pyweb/mumble/management.py +++ b/pyweb/mumble/management.py @@ -101,8 +101,14 @@ def find_existing_instances( **kwargs ): instance = models.Mumble.objects.get( srvid=id ); except models.Mumble.DoesNotExist: conf = murmur.getAllConf( dbus.Int32( id ) ); + + servername = find_in_dicts( "registerName", conf, default, "noname" ); + if not servername: + # RegistrationName was found in the dicts, but is an empty string + servername = "noname"; + values = { - "name": find_in_dicts( "registerName", conf, default, "noname" ), + "name": servername, "srvid": id, "dbus": dbusName, "addr": find_in_dicts( ( "registerHostame", "host" ), conf, default, "0.0.0.0" ),