# HG changeset patch # User Aurelien Campeas # Date 1335528604 -7200 # Node ID a9a7ae11dfb0a4289dfb0b26c04abd775d763ae0 # Parent 7d8979176bc09470bfa8293ef8ebca7eeba3a13c [cwconfig] impose an order on appobject paths processing: entities first (closes #2330799) diff -r 7d8979176bc0 -r a9a7ae11dfb0 cwconfig.py --- a/cwconfig.py Tue Apr 24 10:31:46 2012 +0200 +++ b/cwconfig.py Fri Apr 27 14:10:04 2012 +0200 @@ -700,7 +700,9 @@ vregpath = [] if evobjpath is None: evobjpath = cls.cubicweb_appobject_path - for subdir in evobjpath: + # NOTE: for the order, see http://www.cubicweb.org/ticket/2330799 + # it is clearly a workaround + for subdir in sorted(evobjpath, key=lambda x:x != 'entities'): path = join(CW_SOFTWARE_ROOT, subdir) if exists(path): vregpath.append(path) @@ -712,7 +714,8 @@ if tvobjpath is None: tvobjpath = cls.cube_appobject_path for directory in templpath: - for subdir in tvobjpath: + # NOTE: for the order, see http://www.cubicweb.org/ticket/2330799 + for subdir in sorted(tvobjpath, key=lambda x:x != 'entities'): path = join(directory, subdir) if exists(path): vregpath.append(path)