summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-04-12 10:02:19 -0400
committerDrew DeVault <sir@cmpwn.com>2019-04-12 10:02:19 -0400
commit5b547f4af88027925116981b758745d01b023f12 (patch)
treefc93ee08caf2efd016f9e06bb3f44b63144b4996
parent89ae3e26fc4d70f30036860c0b8b94f185a8c70f (diff)
Fix 500's on bots crawling some repos
-rw-r--r--gitsrht/blueprints/repo.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py
index cb775e2..6f10028 100644
--- a/gitsrht/blueprints/repo.py
+++ b/gitsrht/blueprints/repo.py
@@ -150,7 +150,7 @@ def tree(owner, repo, ref, path):
for part in path:
if part == "":
continue
- if part not in tree:
+ if not tree or part not in tree:
abort(404)
entry = tree[part]
if entry.type == "blob":