incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [19/20] git commit: [#5822] allow routing to nbhd tools if the tool mount point is not a vaild project name
Date Tue, 17 Sep 2013 19:12:17 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/0e945b3d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/0e945b3d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/0e945b3d

Branch: refs/heads/db/5822
Commit: 0e945b3dea494655345c205461413a26c9252373
Parents: 32f56ee
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Wed Sep 11 15:59:19 2013 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Tue Sep 17 18:02:59 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/0e945b3d/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