Browse Source

a few style fixes

Natenom/support-murmur-13-1446181288462
Michael Ziegler 16 years ago
parent
commit
27aa076552
  1. 8
      pyweb/mumble/MumbleCtlDbus.py
  2. 12
      pyweb/mumble/MumbleCtlIce.py
  3. 8
      pyweb/mumble/forms.py
  4. 4
      pyweb/mumble/management.py
  5. 46
      pyweb/mumble/mctl.py
  6. 9
      pyweb/mumble/mmobjects.py
  7. 17
      pyweb/mumble/models.py
  8. 1
      pyweb/mumble/views.py

8
pyweb/mumble/MumbleCtlDbus.py

@ -15,11 +15,11 @@
* GNU General Public License for more details. * GNU General Public License for more details.
""" """
from PIL import Image
from struct import pack, unpack
from zlib import compress, decompress
from PIL import Image
from struct import pack, unpack
from zlib import compress, decompress
from mctl import MumbleCtlBase
from mctl import MumbleCtlBase
import dbus import dbus

12
pyweb/mumble/MumbleCtlIce.py

@ -15,14 +15,14 @@
* GNU General Public License for more details. * GNU General Public License for more details.
""" """
from os.path import join
from PIL import Image
from struct import pack, unpack
from zlib import compress, decompress
from os.path import join
from PIL import Image
from struct import pack, unpack
from zlib import compress, decompress
from django.conf import settings
from django.conf import settings
from mctl import MumbleCtlBase
from mctl import MumbleCtlBase
import Ice import Ice

8
pyweb/mumble/forms.py

@ -14,11 +14,11 @@
* GNU General Public License for more details. * GNU General Public License for more details.
""" """
from django import forms
from django.forms import Form, ModelForm
from django.utils.translation import ugettext_lazy as _
from django import forms
from django.forms import Form, ModelForm
from django.utils.translation import ugettext_lazy as _
from models import *
from models import *
class MumbleAdminForm( ModelForm ): class MumbleAdminForm( ModelForm ):

4
pyweb/mumble/management.py

@ -17,9 +17,9 @@
import os import os
import models import models
from django.db.models import signals
from django.db.models import signals
from mctl import *
from mctl import *
def find_in_dicts( keys, conf, default, valueIfNotFound=None ): def find_in_dicts( keys, conf, default, valueIfNotFound=None ):
if not isinstance( keys, tuple ): if not isinstance( keys, tuple ):

46
pyweb/mumble/mctl.py

@ -24,73 +24,73 @@ class MumbleCtlBase (object):
def getAllConf(self, srvid): def getAllConf(self, srvid):
raise NotImplementedError( "mctl::getAllConf" ); raise NotImplementedError( "mctl::getAllConf" );
def getVersion( self ): def getVersion( self ):
raise NotImplementedError( "mctl::getVersion" ); raise NotImplementedError( "mctl::getVersion" );
def setConf(self, srvid, key, value): def setConf(self, srvid, key, value):
raise NotImplementedError( "mctl::setConf" ); raise NotImplementedError( "mctl::setConf" );
def getDefaultConf(self): def getDefaultConf(self):
raise NotImplementedError( "mctl::getDefaultConf" ); raise NotImplementedError( "mctl::getDefaultConf" );
def newServer(self): def newServer(self):
raise NotImplementedError( "mctl::newServer" ); raise NotImplementedError( "mctl::newServer" );
def setSuperUserPassword(self, srvid, value): def setSuperUserPassword(self, srvid, value):
raise NotImplementedError( "mctl::setSuperUserPassword" ); raise NotImplementedError( "mctl::setSuperUserPassword" );
def start(self, srvid): def start(self, srvid):
raise NotImplementedError( "mctl::start" ); raise NotImplementedError( "mctl::start" );
def stop(self, srvid): def stop(self, srvid):
raise NotImplementedError( "mctl::stop" ); raise NotImplementedError( "mctl::stop" );
def isBooted(self, srvid): def isBooted(self, srvid):
raise NotImplementedError( "mctl::isBooted" ); raise NotImplementedError( "mctl::isBooted" );
def deleteServer(self, srvid): def deleteServer(self, srvid):
raise NotImplementedError( "mctl::deleteServer" ); raise NotImplementedError( "mctl::deleteServer" );
def getPlayers(self, srvid): def getPlayers(self, srvid):
raise NotImplementedError( "mctl::getPlayers" ); raise NotImplementedError( "mctl::getPlayers" );
def getRegisteredPlayers(self, srvid, filter): def getRegisteredPlayers(self, srvid, filter):
raise NotImplementedError( "mctl::getRegisteredPlayers" ); raise NotImplementedError( "mctl::getRegisteredPlayers" );
def getChannels(self, srvid): def getChannels(self, srvid):
raise NotImplementedError( "mctl::getChannels" ); raise NotImplementedError( "mctl::getChannels" );
def registerPlayer(self, srvid, name, email, password): def registerPlayer(self, srvid, name, email, password):
raise NotImplementedError( "mctl::registerPlayer" ); raise NotImplementedError( "mctl::registerPlayer" );
def getRegistration(self, srvid, mumbleid): def getRegistration(self, srvid, mumbleid):
raise NotImplementedError( "mctl::setRegistration" );
raise NotImplementedError( "mctl::getRegistration" );
def setRegistration(self, srvid, mumbleid, name, email, password): def setRegistration(self, srvid, mumbleid, name, email, password):
raise NotImplementedError( "mctl::setRegistration" ); raise NotImplementedError( "mctl::setRegistration" );
def unregisterPlayer(self, srvid, mumbleid): def unregisterPlayer(self, srvid, mumbleid):
raise NotImplementedError( "mctl::unregisterPlayer" ); raise NotImplementedError( "mctl::unregisterPlayer" );
def getBootedServers(self): def getBootedServers(self):
raise NotImplementedError( "mctl::getBootedServers" ); raise NotImplementedError( "mctl::getBootedServers" );
def getAllServers(self): def getAllServers(self):
raise NotImplementedError( "mctl::getAllServers" ); raise NotImplementedError( "mctl::getAllServers" );
def getACL(self, srvid, channelid): def getACL(self, srvid, channelid):
raise NotImplementedError( "mctl::getACL" ); raise NotImplementedError( "mctl::getACL" );
def setACL(self, srvid, acl): def setACL(self, srvid, acl):
raise NotImplementedError( "mctl::setACL" ); raise NotImplementedError( "mctl::setACL" );
def getTexture(self, srvid, mumbleid): def getTexture(self, srvid, mumbleid):
raise NotImplementedError( "mctl::getTexture" ); raise NotImplementedError( "mctl::getTexture" );
def setTexture(self, srvid, mumbleid, infile): def setTexture(self, srvid, mumbleid, infile):
raise NotImplementedError( "mctl::setTexture" ); raise NotImplementedError( "mctl::setTexture" );
@staticmethod @staticmethod
def newInstance( connstring ): def newInstance( connstring ):
# check cache # check cache

9
pyweb/mumble/mmobjects.py

@ -17,11 +17,12 @@
import mctl import mctl
import datetime import datetime
from time import time
from os.path import join
from time import time
from os.path import join
from django.utils.http import urlquote
from django.conf import settings
from django.utils.http import urlquote
from django.conf import settings
def cmp_names( a, b ): def cmp_names( a, b ):
return cmp( a.name, b.name ); return cmp( a.name, b.name );

17
pyweb/mumble/models.py

@ -15,18 +15,15 @@
""" """
import socket import socket
from PIL import Image
from struct import pack, unpack
from zlib import compress, decompress
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.db import models
from django.db import models
from django.db.models import signals
from django.conf import settings
from django.conf import settings
from mmobjects import *
from mctl import *
from mmobjects import *
from mctl import *
class Mumble( models.Model ): class Mumble( models.Model ):
@ -405,8 +402,6 @@ class MumbleUser( models.Model ):
from django.db.models import signals
signals.pre_delete.connect( Mumble.pre_delete_listener, sender=Mumble ); signals.pre_delete.connect( Mumble.pre_delete_listener, sender=Mumble );
signals.pre_delete.connect( MumbleUser.pre_delete_listener, sender=MumbleUser ); signals.pre_delete.connect( MumbleUser.pre_delete_listener, sender=MumbleUser );

1
pyweb/mumble/views.py

@ -20,7 +20,6 @@ from StringIO import StringIO
from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404 from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404
from django.template import RequestContext from django.template import RequestContext
from django.http import Http404, HttpResponse, HttpResponseRedirect from django.http import Http404, HttpResponse, HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.conf import settings from django.conf import settings

Loading…
Cancel
Save