Browse Source

syncdb hook now tries to get the connection string from env variable MURMUR_CONNSTR before asking

Natenom/support-murmur-13-1446181288462
Michael Ziegler 16 years ago
parent
commit
87f06ab8b8
  1. 9
      pyweb/mumble/management.py

9
pyweb/mumble/management.py

@ -14,6 +14,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
""" """
import os
import models import models
from django.db.models import signals from django.db.models import signals
@ -45,10 +46,13 @@ def find_existing_instances( **kwargs ):
if v > 1: if v > 1:
print "Starting Mumble servers and players detection now."; print "Starting Mumble servers and players detection now.";
triedEnviron = False;
online = False; online = False;
while not online: while not online:
print
if not triedEnviron and 'MURMUR_CONNSTR' in os.environ:
dbusName = os.environ['MURMUR_CONNSTR'];
triedEnviron = True;
else:
print "--- Murmur connection info ---" print "--- Murmur connection info ---"
print " 1) DBus -- net.sourceforge.mumble.murmur" print " 1) DBus -- net.sourceforge.mumble.murmur"
print " 2) ICE -- Meta:tcp -h 127.0.0.1 -p 6502" print " 2) ICE -- Meta:tcp -h 127.0.0.1 -p 6502"
@ -75,6 +79,7 @@ def find_existing_instances( **kwargs ):
if v: if v:
print "Unable to connect using name %s. The error was:" % dbusName; print "Unable to connect using name %s. The error was:" % dbusName;
print instance; print instance;
print
else: else:
online = True; online = True;
if v > 1: if v > 1:

Loading…
Cancel
Save