[tools] fixed python 2.x cmp
This commit is contained in:
parent
8d11b9b822
commit
d46f914da4
@ -28,6 +28,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import string
|
import string
|
||||||
import utils
|
import utils
|
||||||
|
import operator
|
||||||
|
|
||||||
from SCons.Script import *
|
from SCons.Script import *
|
||||||
from utils import _make_path_relative
|
from utils import _make_path_relative
|
||||||
@ -678,13 +679,12 @@ def DefineGroup(name, src, depend, **parameters):
|
|||||||
def PriorityInsertGroup(groups, group):
|
def PriorityInsertGroup(groups, group):
|
||||||
length = len(groups)
|
length = len(groups)
|
||||||
for i in range(0, length):
|
for i in range(0, length):
|
||||||
if cmp(groups[i]['name'].lower(), group['name'].lower()) > 0:
|
if operator.gt(groups[i]['name'].lower(), group['name'].lower()):
|
||||||
groups.insert(i, group)
|
groups.insert(i, group)
|
||||||
return
|
return
|
||||||
groups.append(group)
|
groups.append(group)
|
||||||
|
|
||||||
# add a new group
|
# add a new group
|
||||||
#Projects.append(group)
|
|
||||||
PriorityInsertGroup(Projects, group)
|
PriorityInsertGroup(Projects, group)
|
||||||
|
|
||||||
return objs
|
return objs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user