incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [5/8] git commit: [#4818] sort entry points for reliable ordering
Date Tue, 13 Aug 2013 19:20:36 GMT
[#4818] sort entry points for reliable ordering


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/9ac5e8c1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/9ac5e8c1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/9ac5e8c1

Branch: refs/heads/db/6482
Commit: 9ac5e8c12deac1b6f86f61682f268b7d9f7d57f0
Parents: 77ab85b
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Fri Aug 9 21:47:00 2013 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Tue Aug 13 15:56:11 2013 +0000

----------------------------------------------------------------------
 Allura/allura/ext/admin/admin_main.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9ac5e8c1/Allura/allura/ext/admin/admin_main.py
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/admin/admin_main.py b/Allura/allura/ext/admin/admin_main.py
index 98a34c8..06aaec1 100644
--- a/Allura/allura/ext/admin/admin_main.py
+++ b/Allura/allura/ext/admin/admin_main.py
@@ -140,7 +140,8 @@ class AdminApp(Application):
             links.append(None)
             links.append(SitemapEntry('Help', nbhd_admin_url+ 'help/'))
 
-        for name, admin_extension in g.entry_points['admin'].iteritems():
+        for ep_name in sorted(g.entry_points['admin'].keys()):
+            admin_extension = g.entry_points['admin'][ep_name]
             admin_extension().update_project_sidebar_menu(links)
 
         return links
@@ -156,7 +157,8 @@ class AdminExtensionLookup(object):
 
     @expose()
     def _lookup(self, name, *remainder):
-        for ext_name, admin_extension in g.entry_points['admin'].iteritems():
+        for ep_name in sorted(g.entry_points['admin'].keys()):
+            admin_extension = g.entry_points['admin'][ep_name]
             controller = admin_extension().project_admin_controllers.get(name)
             if controller:
                 return controller(), remainder


Mime
View raw message