mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-20 20:17:29 +08:00
[tools] fixed python 2.x cmp
This commit is contained in:
parent
8d11b9b822
commit
d46f914da4
@ -28,6 +28,7 @@ import os
|
||||
import sys
|
||||
import string
|
||||
import utils
|
||||
import operator
|
||||
|
||||
from SCons.Script import *
|
||||
from utils import _make_path_relative
|
||||
@ -678,13 +679,12 @@ def DefineGroup(name, src, depend, **parameters):
|
||||
def PriorityInsertGroup(groups, group):
|
||||
length = len(groups)
|
||||
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)
|
||||
return
|
||||
groups.append(group)
|
||||
|
||||
# add a new group
|
||||
#Projects.append(group)
|
||||
PriorityInsertGroup(Projects, group)
|
||||
|
||||
return objs
|
||||
|
Loading…
x
Reference in New Issue
Block a user