Browse Source

fix the order function causing an AttributeError on pre-1.2.1 Murmur servers

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
4cfd243649
  1. 2
      pyweb/mumble/mmobjects.py

2
pyweb/mumble/mmobjects.py

@ -25,10 +25,10 @@ from django.conf import settings
def cmp_channels( left, rite ): def cmp_channels( left, rite ):
""" Compare two channels, first by position, and if that equals, by name. """ """ Compare two channels, first by position, and if that equals, by name. """
if hasattr( left, "position" ) and hasattr( rite, "position" ):
byorder = cmp( left.position, rite.position ); byorder = cmp( left.position, rite.position );
if byorder != 0: if byorder != 0:
return byorder; return byorder;
else:
return cmp_names( left, rite ); return cmp_names( left, rite );
def cmp_names( left, rite ): def cmp_names( left, rite ):

Loading…
Cancel
Save