From 443c711a7bb84e2c6b0fd2929a1bcb6e634257c9 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 25 2014 11:10:08 +0000 Subject: Add an error message when trying to view a branch that's not in the repo --- diff --git a/progit/app.py b/progit/app.py index ad95c51..f664a44 100644 --- a/progit/app.py +++ b/progit/app.py @@ -107,7 +107,7 @@ def view_repo_branch(repo, branchname, username=None): repo_obj = pygit2.Repository(reponame) if not branchname in repo_obj.listall_branches(): - flask.abort(404) + flask.abort(404, 'Branch no found') branch = repo_obj.lookup_branch(branchname) @@ -164,7 +164,7 @@ def view_log(repo, branchname=None, username=None): repo_obj = pygit2.Repository(reponame) if branchname and not branchname in repo_obj.listall_branches(): - flask.abort(404) + flask.abort(404, 'Branch no found') if branchname: branch = repo_obj.lookup_branch(branchname)