incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [3/4] git commit: [#5822] allow routing to nbhd tools if the tool mount point is not a vaild project name
Date Mon, 23 Sep 2013 16:28:24 GMT
[#5822] allow routing to nbhd tools if the tool mount point is not a vaild project name


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

Branch: refs/heads/master
Commit: a897dc77d0ab7762de00d67ae9852306689d98b7
Parents: 1531d7a
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Wed Sep 11 15:59:19 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Mon Sep 23 16:27:12 2013 +0000

----------------------------------------------------------------------
 Allura/allura/controllers/project.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a897dc77/Allura/allura/controllers/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/project.py b/Allura/allura/controllers/project.py
index 9914dc9..e2c7ee8 100644
--- a/Allura/allura/controllers/project.py
+++ b/Allura/allura/controllers/project.py
@@ -85,9 +85,10 @@ class NeighborhoodController(object):
         provider = plugin.ProjectRegistrationProvider.get()
         try:
             provider.shortname_validator.to_python(pname, check_allowed=False, neighborhood=self.neighborhood)
-        except Invalid as e:
-            raise exc.HTTPNotFound, pname
-        project = M.Project.query.get(shortname=self.prefix + pname, neighborhood_id=self.neighborhood._id)
+        except Invalid:
+            project = None
+        else:
+            project = M.Project.query.get(shortname=self.prefix + pname, neighborhood_id=self.neighborhood._id)
         if project is None and self.prefix == 'u/':
             # create user-project if it is missing
             user = M.User.query.get(username=pname, disabled=False)


Mime
View raw message