Return-Path: X-Original-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B595210F84 for ; Tue, 17 Sep 2013 19:13:53 +0000 (UTC) Received: (qmail 10381 invoked by uid 500); 17 Sep 2013 19:12:33 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 10024 invoked by uid 500); 17 Sep 2013 19:12:10 -0000 Mailing-List: contact allura-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-commits@incubator.apache.org Received: (qmail 9627 invoked by uid 99); 17 Sep 2013 19:12:00 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Sep 2013 19:12:00 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id EB341A4A1; Tue, 17 Sep 2013 19:11:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: brondsem@apache.org To: allura-commits@incubator.apache.org Date: Tue, 17 Sep 2013 19:12:17 -0000 Message-Id: <8be4c55f19cf4ba388e67653e7690213@git.apache.org> In-Reply-To: <4aab4676f6694722aef845f79aa45d5b@git.apache.org> References: <4aab4676f6694722aef845f79aa45d5b@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [19/20] git commit: [#5822] allow routing to nbhd tools if the tool mount point is not a vaild project name [#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 Authored: Wed Sep 11 15:59:19 2013 +0000 Committer: Dave Brondsema 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)