diff --git a/pyweb/mumble/MumbleCtlIce.py b/pyweb/mumble/MumbleCtlIce.py index b755139..1497948 100644 --- a/pyweb/mumble/MumbleCtlIce.py +++ b/pyweb/mumble/MumbleCtlIce.py @@ -41,13 +41,18 @@ def loadSlice( slicefile ): # Ice returns '' in getSliceDir() sometimes. (I kid you not.) if not icepath: - from django.conf import settings - icepath = settings.SLICEDIR - if not exists( join( icepath, "Ice", "SliceChecksumDict.ice" ) ): + try: + from django.conf import settings + except ImportError: + # CTL is being used independently from MD icepath = None + else: + icepath = settings.SLICEDIR + if not exists( join( icepath, "Ice", "SliceChecksumDict.ice" ) ): + icepath = None if not icepath: - # last resort when getSliceDir fails AND settings are wrong, won't work for >=1.2.3 + # last resort when getSliceDir fails AND settings are wrong/unavailable, won't work for >=1.2.3 Ice.loadSlice( slicefile ) else: Ice.loadSlice( '', ['-I' + icepath, slicefile ] )