allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [7/8] git commit: [#4818] don't error if tool doesn't exist any more
Date Tue, 13 Aug 2013 19:20:38 GMT
[#4818] don't error if tool doesn't exist any more


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

Branch: refs/heads/db/6482
Commit: 77ab85b6e0dd27e1540d323adc6c7469ac2f5b4a
Parents: 3e0087c
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Fri Aug 9 20:01:21 2013 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Tue Aug 13 15:56:11 2013 +0000

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


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/77ab85b6/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 92efacb..98a34c8 100644
--- a/Allura/allura/ext/admin/admin_main.py
+++ b/Allura/allura/ext/admin/admin_main.py
@@ -153,7 +153,7 @@ class AdminApp(Application):
 
 
 class AdminExtensionLookup(object):
-    
+
     @expose()
     def _lookup(self, name, *remainder):
         for ext_name, admin_extension in g.entry_points['admin'].iteritems():
@@ -177,8 +177,11 @@ class ProjectAdminController(BaseController):
     @with_trailing_slash
     @expose('jinja:allura.ext.admin:templates/project_admin.html')
     def index(self, **kw):
-        scm_tools = [tool for tool in c.project.app_configs if issubclass(
-                g.entry_points["tool"][tool.tool_name], RepositoryApp)]
+        scm_tools = []
+        for tool in c.project.app_configs:
+            app = g.entry_points["tool"].get(tool.tool_name)
+            if app and issubclass(app, RepositoryApp):
+                scm_tools.append(tool)
         return dict(scm_tools=scm_tools)
 
     @without_trailing_slash


Mime
View raw message