summaryrefslogtreecommitdiffstats
path: root/gitsrht/blueprints/repo.py
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-10-18 08:42:54 -0400
committerDrew DeVault <sir@cmpwn.com>2018-10-18 08:42:54 -0400
commitb86703847658460fcf883600fc9328f46178e224 (patch)
tree6af8668a0363753e971a4a91c4427e708e08f4fa /gitsrht/blueprints/repo.py
parent237f2c1b96467033e21adb3a99b2e82997d66499 (diff)
Abort repo.tree if there is no tree
Diffstat (limited to 'gitsrht/blueprints/repo.py')
-rw-r--r--gitsrht/blueprints/repo.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py
index 707a1ce..6c30ffe 100644
--- a/gitsrht/blueprints/repo.py
+++ b/gitsrht/blueprints/repo.py
@@ -132,6 +132,8 @@ def tree(owner, repo, ref, path):
commit, ref = lookup_ref(git_repo, ref)
tree = commit.tree
+ if not tree:
+ abort(404)
editorconfig = EditorConfig(git_repo, tree, path)
path = path.split("/")