comparison mxtool/mx.py @ 16944:a04d9cbc149f

mx: Make order of projects() deterministic
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 26 Aug 2014 10:46:48 +0200
parents 73d994651fcd
children 5e5f5073d713
comparison
equal deleted inserted replaced
16943:f8e60d11c0ec 16944:a04d9cbc149f
1245 1245
1246 def projects(opt_limit_to_suite=False): 1246 def projects(opt_limit_to_suite=False):
1247 """ 1247 """
1248 Get the list of all loaded projects limited by --suite option if opt_limit_to_suite == True 1248 Get the list of all loaded projects limited by --suite option if opt_limit_to_suite == True
1249 """ 1249 """
1250 1250 sortedProjects = sorted(_projects.values(), key=lambda p: p.name)
1251 if opt_limit_to_suite: 1251 if opt_limit_to_suite:
1252 return _projects_opt_limit_to_suites(_projects.values()) 1252 return _projects_opt_limit_to_suites(sortedProjects)
1253 else: 1253 else:
1254 return _projects.values() 1254 return sortedProjects
1255 1255
1256 def projects_opt_limit_to_suites(): 1256 def projects_opt_limit_to_suites():
1257 """ 1257 """
1258 Get the list of all loaded projects optionally limited by --suite option 1258 Get the list of all loaded projects optionally limited by --suite option
1259 """ 1259 """