Fix sorting of flagmapping files

Change-Id: I77a674e37c7b9e30381d6b48f2812e94fea41a84
This commit is contained in:
Gauvain Pocentek
2014-03-11 17:37:09 +01:00
parent 21a2fd16d2
commit ddf613cca2

View File

@@ -191,6 +191,8 @@ class OptionsCache(object):
else:
self._add_opt(group + '/' + opt.name, group, opt)
self._opt_names.sort(OptionsCache._cmpopts)
def get_option_names(self):
return self._opt_names
@@ -201,7 +203,7 @@ class OptionsCache(object):
def _cmpopts(x, y):
if '/' in x and '/' in y:
prex = x[:x.find('/')]
prey = y[:x.find('/')]
prey = y[:y.find('/')]
if prex != prey:
return cmp(prex, prey)
return cmp(x, y)