Browse Source

prevent checkenv from failing if Ice is not available.

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
5f73c19d94
  1. 10
      pyweb/mumble/management/commands/checkenv.py

10
pyweb/mumble/management/commands/checkenv.py

@ -14,7 +14,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
""" """
import os, Ice
import os
from django.core.management.base import BaseCommand from django.core.management.base import BaseCommand
from django.contrib.auth.models import User from django.contrib.auth.models import User
@ -29,7 +29,13 @@ class TestFailed( Exception ):
class Command( BaseCommand ): class Command( BaseCommand ):
def handle(self, **options): def handle(self, **options):
try:
import Ice
except ImportError:
pass
else:
self.check_slice(); self.check_slice();
self.check_rootdir(); self.check_rootdir();
self.check_dbase(); self.check_dbase();
self.check_sites(); self.check_sites();
@ -167,7 +173,7 @@ class Command( BaseCommand ):
for mumble in mm: for mumble in mm:
try: try:
mumble.ctl mumble.ctl
except Ice.Exception, err:
except Exception, err:
raise TestFailed( raise TestFailed(
"Connecting to Murmur `%s` (%s) failed: %s" % ( mumble.name, mumble.server, err ) "Connecting to Murmur `%s` (%s) failed: %s" % ( mumble.name, mumble.server, err )
); );

Loading…
Cancel
Save