From 5b547f4af88027925116981b758745d01b023f12 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 12 Apr 2019 10:02:19 -0400 Subject: Fix 500's on bots crawling some repos --- gitsrht/blueprints/repo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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": -- cgit v1.2.3