Browse Source

add checks to prevent confusing Ice with spaces in the slice path. (no kidding.)

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
53d00abd66
  1. 9
      pyweb/mumble/management/commands/checkenv.py

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

@ -42,6 +42,12 @@ class Command( BaseCommand ):
if settings.SLICE is None:
raise TestFailed( "You don't have set the SLICE variable in settings.py." )
if " " in settings.SLICE:
raise TestFailed( "You have a space char in your Slice path. This will confuse Ice, please check." )
if not settings.SLICE.endswith( ".ice" ):
raise TestFailed( "The slice file name MUST end with '.ice'." )
try:
fd = open( settings.SLICE, "rb" )
slice = fd.read()
@ -49,6 +55,9 @@ class Command( BaseCommand ):
except IOError, err:
raise TestFailed( "Failed opening the slice file: %s" % err )
import Ice
Ice.loadSlice( settings.SLICE )
print "[ OK ]"
def check_rootdir( self ):

Loading…
Cancel
Save