Browse Source

check if getSliceDir is actually available before trying to call it (Debian Lenny...)

Natenom/support-murmur-13-1446181288462
Michael Ziegler 14 years ago
parent
commit
1a5965d638
  1. 6
      pyweb/mumble/MumbleCtlIce.py
  2. 2
      pyweb/mumble/views.py

6
pyweb/mumble/MumbleCtlIce.py

@ -34,7 +34,11 @@ import Ice, IcePy, tempfile
def loadSlice( slicefile ):
""" Load the slice file with the correct include dir set, if possible. """
icepath = Ice.getSliceDir()
if hasattr( Ice, "getSliceDir" ):
icepath = Ice.getSliceDir()
else:
icepath = None
if not icepath:
# last resort, let's hope to christ this works (won't for >=1.2.3)
Ice.loadSlice( slicefile )

2
pyweb/mumble/views.py

@ -421,7 +421,7 @@ def cvp_xml( request, server ):
from xml.etree.cElementTree import tostring as xml_to_string
srv = get_object_or_404( Mumble, id=int(server) )
return HttpResponse(
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+\
'<?xml version="1.0" encoding="UTF-8" ?>'+\
xml_to_string( srv.asXml( cvp_checkauth( request, srv ) ), encoding='utf-8' ),
mimetype='text/xml'
)

Loading…
Cancel
Save